std::vector<int> myvec(){
std::vector<int> myvector;
// do some push_back's
return myvector;
}
std::string mystr(){
std::string mystring = "hello";
return mystring;
}
std::vector<int> myvector = myvec();
std::string mystring = mystr();
Will it move? Or will it be copied by value?
Do not have anything else to say, but have to fulfil the requirement of writing more. Hence I am writing down some more text for you, folks