Closed
Description
I would prefer not specifying rvalue only on the function parameter. It's similarly efficient to have a pass-by-value parameter that you can move in and out of.
If you declare as:
bool insert(ArrayIndex index, Value newValue);
You can call as
Value foo(); insert(index, std::move(foo))
Some good material on this.
http://blogs.microsoft.co.il/sasha/2014/08/21/c-sink-parameter-passing/