This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-12-19
[Moved to DR at the November, 2014 meeting.]
A member function with no ref-qualifier can be called for a class prvalue, as can a non-member function whose first parameter is an rvalue reference to that class type. However, 13.7.7.3 [temp.func.order] does not handle this case.
Proposed resolution (February, 2014):
Change 13.7.7.3 [temp.func.order] paragraph 3 as follows:
...If only one of the function templates M is a non-static member of some class A,that function templateM is considered to have a new first parameter inserted in its function parameter list. Given cv as the cv-qualifiers ofthe function templateM (if any), the new parameter is of type “rvalue reference to cv A” if the optional ref-qualifier ofthe function templateM is &&,or if M has no ref-qualifier and the first parameter of the other template has rvalue reference type. Otherwise, the new parameter is of type “lvalue reference to cv A”otherwise. [Note: This allows a non-static member to be ordered with respect to a nonmember function and for the results to be equivalent to the ordering of two equivalent nonmembers. —end note] [Example:...