Topic: Defect report: ref-qualifiers in partial ordering of non-static


Author: "Richard Smith"<richard@metafoo.co.uk>
Date: Wed, 19 Oct 2011 15:24:44 -0700 (PDT)
Raw View
Hi,

C++11 [temp.func.order]p3 says:

"If only one of the function templates is a non-static member, that function
template is considered to have a new first parameter inserted in its function
parameter list. The new parameter is of type   reference to cv A,   where cv are
the cv-qualifiers of the function template (if any) and A is the class of
which the function template is a member. [ 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 ]"

This paragraph does not specify what kind of reference the new parameter
should be (and I can't see anywhere else in the standard which specifies
this). It seems to me that the standard should specify that the new parameter
shall be an rvalue reference if the non-static member function template uses
the&&  ref-qualifier, and an lvalue reference otherwise.

Thanks,
Richard


--
[ comp.std.c++ is moderated.  To submit articles, try posting with your ]
[ newsreader.  If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]