Re:Bjarne Stroustrup – The Essence of C++ [video]
by marshray on Tuesday September 17, 2013 @06:41PM
(#6402400)
> What if you do wind up wanting to refer to s in the body later on?
Then copy s, don't move it.
Re:Bjarne Stroustrup – The Essence of C++ [video]
by a8da6b0c91d on Tuesday September 17, 2013 @07:01PM
(#6402465)
The point is move makes things that look like values as annoying as pointers. You have to keep track.
move calls strike me as ugly and kinda dangerous. What if you do wind up wanting to refer to s in the body later on? It'd be nice if the compiler just handled it.