Do rvalue references allow dangling references?
Do rvalue references allow dangling references? If you meant “Is it possible to create dangling rvalue references” then the answer is yes. Your example, however, string middle_name () { return “Jaan”; } int main() { string&& nodanger = middle_name(); // OK. // The life-time of the temporary is extended // to the life-time of the … Read more