This is a modification of my earlier question Explicit move constructor needed in container?.
I have a templated container class:
template<class Stuff>
class Bag{
public:
~Bag() {//Do some stuff here so that the compiler doesn't implement move semantics}
private:
std::vector<Stuff> mData;
};
I want to do
void InPlace(Bag<Array>& Left){
Bag<Array> temp;
Transform(Left, temp); //fills temp with desirable output
Left = std::move(temp);
}
Suppose Array has user-defined move semantics, but Bag does not. Would mData in this case be moved or copied?