const reference to a temporary object becomes broken after function scope (life time)

The lifetime-extension of a temporary object can be performed only once, when the temporary object gets bound to the first reference. After that, the knowledge that the reference refers to a temporary object is gone, so further lifetime extensions are not possible. The case that is puzzling you A const& refnop = A(a).nothing(); is similar … Read more