I think I have a problem with understanding rvalue references. What is really the lifetime and usage of such construction.
int&& value = 5;
If I understand correctly, 5 is rvalue object (I can't take address of it) and it's temporary - lifetime is end of current expression. Does assigning that to rvalue reference somehow prolong lifetime? If yes, what is the new lifetime of object?
See Question&Answers more detail:os