Why can I assign the result of a function returning a value? Is it an lvalue?
No, the return value of a function is an l-value if and only if it is a reference (C++03). (5.2.2 [expr.call] / 10) If the type returned were a basic type then this would be a compile error. (5.17 [expr.ass] / 1) The reason that this works is that you are allowed to call member … Read more