0
If (&)references are alias of lvalue objects-variables then (&&)references are alias of what?
References have no space in memory but they 'share' the same as their object. So If I did: MyClass* obj=new MyClass(); MyClass& ref = *obj; The ref would have the same adress as obj. However in this example: std::string first= "Hello "; std::string second="World!"; std::string&& ref= first+second; What is the memory of ref?
1 Antwort