I have a very basic question: is it a good idea to return a std::vector<A>
using std::move
? For, example:
class A {};
std::vector<A> && func() {
std::vector<A> v;
/* fill v */
return std::move(v);
}
Should I return std::map
, std::list
.. etc... in this way?
std::vector<A> & v;
?? are you sure about that ? – Cordellcorder