c++ move semantics for `this`
struct S
{
std::vector<int> data;
S doStuff() &&
{
std::cout << "rvalue\n";
return {std::move(data)};
}
S doStuff() const&
{
std::cout << "const lvalue\n";
return {data};
}
};