class Foo { int a; int b; int c; std::wstring d; std::vector<char*> e };
Assuming a large string (~512 bytes) and ~512 bytes for the std::vector and it's use case as the following:
void Test()
{
Foo foo;
DoSomething(std::move(foo)); // DoSomething will stuff it in a long-lived queue
}
Essentially I want the RAII's object's lifetime to change.
Is this when I implement a move constructor and assignment operator? Or just doing std::move(..) is good enough?
Foo/the vector won't copy the strings in any case.