http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50025

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.0

--- Comment #24 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to __vic from comment #23)
> Is it related bug?

Yes, the original C++11 rules required a temporary to be created there and the
reference member binds to that temporary (which then goes out of scope).

Your code works correctly with GCC 4.9

Reply via email to