To produce the transformed template, for each type, non-type, or template
template parameter (including
template parameter packs
thereof) synthesize a unique type, value, or class template
respectively and substitute it for each occurrence of that parameter
in the function type of the template
. [
Note 1:
The type replacing the placeholder
in the type of the value synthesized for a non-type template parameter
is also a unique synthesized type
. —
end note]
Each function template
M that is a member function
is considered to have
a new first parameter of type
X(M), described below,
inserted in its function parameter list
. If exactly one of the function templates was considered by overload resolution
via a rewritten candidate (
[over.match.oper])
with a reversed order of parameters,
then the order of the function parameters in its transformed template
is reversed
. For a function template
M with cv-qualifiers
cv
that is a member of a class
A:
The type
X(M) is “rvalue reference to
cv A”
if the optional
ref-qualifier of
M is
&& or
if
M has no
ref-qualifier and
the positionally-corresponding parameter of the other transformed template
has rvalue reference type;
if this determination depends recursively upon
whether
X(M) is an rvalue reference type,
it is not considered to have rvalue reference type
.Otherwise,
X(M) is “lvalue reference to
cv A”
.