With reference to Non-static member functions, under
const-, volatile-, and ref-qualified member functions
it is mentioned:
A non-static member function can be declared with no ref-qualifier, with an lvalue ref-qualifier (the token & after the parameter list) or the rvalue ref-qualifier (the token && after the parameter list). During overload resolution, non-static cv-qualified member function of class X is treated as follows:
no ref-qualifier: the implicit object parameter has type lvalue reference to cv-qualified X and is additionally allowed to bind rvalue implied object argument
lvalue ref-qualifier: the implicit object parameter has type lvalue reference to cv-qualified X
rvalue ref-qualifier: the implicit object parameter has type rvalue reference to cv-qualified X
Note: unlike cv-qualification, ref-qualification does not change the properties of the this pointer: within a rvalue ref-qualified function, *this remains an lvalue expression.
In this context, what is the difference between the implicit object parameter and *this?
*thisonce the function is invoked. There probably is some rationale that you shouldn’t be able to call further rvalue qualified functions without an explicitstd::move(*this).thispointer that’s used for member function calls, not the implicit object parameter. coliru.stacked-crooked.com/a/3819152edc5a1914memfun()and(*this).memfun(), i.e. it’s not like the first form uses the type of the implicit object paramter instead of the type of*thisfor overload resolution.(*this).