Temporaries exist for the duration of the expression they were created in.
Except if they are bound to a reference, in which case they live for the duration of the life of the reference, except in certain situation covered in section 12.2.5 of the standard.
You are half right.
Temporaries exist for the duration of the expression they were created in.
Except if they are bound to a reference, in which case they live for the duration of the life of the reference, except in certain situation covered in section 12.2.5 of the standard.
I learned something today.