This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/49022] [C++0x][DR 2058] std::begin and std::end specialized for std::valarray with some operators are missing.
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 14 Jun 2011 13:02:12 +0000
- Subject: [Bug libstdc++/49022] [C++0x][DR 2058] std::begin and std::end specialized for std::valarray with some operators are missing.
- Auto-submitted: auto-generated
- References: <bug-49022-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49022
--- Comment #19 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-06-14 13:01:24 UTC ---
Ah, no the problem is std::__addressof<const _Tp>(__ex()[0]) which takes the
address of a temporary returned by operator[]
The range-based for seems to do the right thing