Timeline for Intended invalid intialization from rvalue using *this
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 19, 2021 at 8:52 | vote | accept | Patryk Kowalski | ||
Jan 19, 2021 at 8:38 | comment | added | M.M | There's no such thing as "rvalue object" and "lvalue object". The terms "rvalue" and "lvalue" refer to expressions. This is commonly mis-taught. | |
Jan 19, 2021 at 8:33 | history | edited | Enlico | CC BY-SA 4.0 |
added 1 character in body
|
Jan 19, 2021 at 8:27 | answer | added | Enlico | timeline score: 3 | |
Jan 19, 2021 at 8:23 | comment | added | molbdnilo |
The result of the function (the X& ) is not an rvalue. If you try to change foo to return an rvalue reference (X&& ), the compiler will not let you.
|
|
Jan 19, 2021 at 8:22 | review | First posts | |||
Jan 19, 2021 at 8:46 | |||||
Jan 19, 2021 at 8:16 | history | asked | Patryk Kowalski | CC BY-SA 4.0 |