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.

Reply via email to