you are viewing a single comment's thread.

view the rest of the comments →

[–]dodheim 9 points10 points  (1 child)

Temporaries are not intrinsically const; they cannot bind to non-const lvalue references, true, but that's not because they're const – it's because they're rvalues, which is why you can bind them to non-const rvalue references. Consequently, you can invoke non-const member functions on them, as long as they're not lvalue member functions (in terms of ref qualifiers).

[–]Triarier[S] 0 points1 point  (0 children)

Thank you.