3 ms·
> As far as I'm aware moves are only done when explicitly asked for no, every time you have a function returning a temporary you can have a move, e.g. std
by jcelerier 9y ago
> As far as I'm aware moves are only done when explicitly asked for
no, every time you have a function returning a temporary you can have a move, e.g.
std::vector<int> myfun();
struct myclass { myclass(std::vector<int> v); };
here if you do
myclass c{myfun()};
there can be a move