[quote title=Klugier wrote on Tue, 13 October 2015 16:38]Hello Deep,
Try to clone your vector. I think in your case there is move operation for some reason. Maybe someone that knows better that mechanism can describe it for you. [code]
Yes, it is 'pick' (U++ variant of move).
In C++11 mode, the code would not even compile. Unfortunately, before c++11, there are no means to detect these errors at compile time.
Note that the optimal variant to using 'clone' is to use const reference (unless you need to change the element you are getting).