The title length available isn't really long enough to explain the goal of my thread. I'm sorry about that.
I want some opinions regarding what to call functions, methods, and operators, that perform a potentially destructive alteration on a reference in some tutorials I'm writing.
(For those who have no idea what I'm talking about: the upcoming C++ standard will include 'rvalue' references which will naturally allow for move semantics--move semantics at the language, instead of library, level.)
I've seen a handful of articles on 'rvalue' references. They provide an introduction. They barely scratch the surface. They scarcely hint at how valuable the addition is to the language. (I don't imagine that I'll hit on everything in the tutorials. I don't even desire that. The tutorials would be to complicated. I would like to provide some real suggestions and direction.) I would like to use a consistent and unique name throughout to lend emphasis to that importance.
I've not seen more than a few articles calling functions using 'rvalue' references anything. The articles I have seen don't agree on what to call them. One article doesn't even name them consistently. They perform a specific operation and are provided for a specific purpose, I think they deserve a specific name.
Even though the name is closely associated with library implementations of move semantics, I've been calling the relevant constructors "move constructors" and the relevant operators "more operators". I use more specific names in more specific circumstances--like "move with assignment by addition". I like these names.
None of that helps with freestanding functions and methods. With the addition of move semantics to the language I imagine that three or four overloads will become standard where two or three was common.
That's all fine. Which ones to provide depends on the purposes and the syntactical and semantic advantage desired.
some_type do_something(some_type); // 1
some_type do_something(const some_type &); // 2
some_type & do_something(some_type &); // 3
What should we call this one? Calling it a "move overload for 'do_something'" sounds promising. What do you think of that?
some_type && do_something(some_type &&); // 4