This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/49022] [C++0x] std::begin and std::end specialized for std::valarray with some operators are missing.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]