> So it seems that I need to always write "return move(...)" to take advantage of move semantics when returning lvalues that will go away right after return completes? Is that intentional? Or am I not getting something about how copy/move works in Clay?
You're not missing anything; that's just how the compiler works
currently. Automatic NRVO is not implemented yet, but would be a good
idea.
-Joe
Yeah, implicit move with NRVO if possible would be how Clay should do
it, just like in C++11. See
https://github.com/jckarter/clay/issues/238 . Currently Clay does not
distinguish automatic-storage variables from other references, so
explicit move is always required, though that should be fixed.
-Joe