If you pass in an rvalue reference, you *do* expect it to be modified and you do not expect it to be accessible afterwards.
That's only an until-so-far STL convention.
In my own code I treat rvalue references as "this may or may not be
consumed" parameter. So the function may consume the input wholly,
leaving it in some zombie state. Or it may leave it as is. Obviously the
return type says what happened.
This lets you write filtering functions such as:
SomeObj foo.
filter_a(std::move(foo));
filter_b(std::move(foo));
filter_c(std::move(foo));
filter_d(std::move(foo));
Now some will quite rightly object to using std::move when I mean "maybe
move". I should really type out:
filter_a(static_cast