[Bug libstdc++/49022] [C++0x] std::begin and std::end specialized for std::valarray with some operators are missing.
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue May 17 16:06:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49022
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-05-17 15:27:01 UTC ---
The workaround for users is to construct a valarray from the expr:
std::valarray<int> result(x + y);
std::begin( result );
That avoids the problem of returning an iterator into a temporary which no
longer exists.
More information about the Gcc-bugs
mailing list