How to return a class member vector in c++11
问题 I read a couple of posts on how to return a vector from a method include these ones: c11 rvalues and move semantics confusion return statement want speed pass by value why does visual studio not perform return value optimization rvo Wiki - Return Value Optimization and I'm still confused on how to pass a vector the right way in VS2013 and what are the differences between the following methods in this code(the questions are marked in the comments): class Foo{ private: std::vector<int> vect;