https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61769

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID
           Severity|major                       |normal

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to theemathas from comment #4)
> According to
> http://herbsutter.com/2008/01/01/gotw-88-a-candidate-for-the-most-important-
> const/ : binding a temporary to a const reference "lengthens the lifetime of
> the temporary to the lifetime of the reference itself"

You don't bind a temporary to a const-reference, you bind a const-reference to
a const-reference, so the lifetime of the temporary is not extended. The
lifetime extension behaviour is not transitive from reference to reference.

Reply via email to