tmp/tmps1bziaj1/{from.md → to.md}
RENAMED
|
@@ -28,18 +28,19 @@ specialized template is the one chosen by the partial ordering process.
|
|
| 28 |
To produce the transformed template, for each type, non-type, or
|
| 29 |
template template parameter (including template parameter packs (
|
| 30 |
[[temp.variadic]]) thereof) synthesize a unique type, value, or class
|
| 31 |
template respectively and substitute it for each occurrence of that
|
| 32 |
parameter in the function type of the template. If only one of the
|
| 33 |
-
function templates is a non-static member
|
| 34 |
-
considered to have a new first parameter inserted
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
|
|
|
| 41 |
|
| 42 |
``` cpp
|
| 43 |
struct A { };
|
| 44 |
template<class T> struct B {
|
| 45 |
template<class R> int operator*(R&); // #1
|
|
|
|
| 28 |
To produce the transformed template, for each type, non-type, or
|
| 29 |
template template parameter (including template parameter packs (
|
| 30 |
[[temp.variadic]]) thereof) synthesize a unique type, value, or class
|
| 31 |
template respectively and substitute it for each occurrence of that
|
| 32 |
parameter in the function type of the template. If only one of the
|
| 33 |
+
function templates is a non-static member of some class `A`, that
|
| 34 |
+
function template is considered to have a new first parameter inserted
|
| 35 |
+
in its function parameter list. Given cv as the cv-qualifiers of the
|
| 36 |
+
function template (if any), the new parameter is of type “rvalue
|
| 37 |
+
reference to cv `A`” if the optional *ref-qualifier* of the function
|
| 38 |
+
template is `&&`, or of type “lvalue reference to cv `A`” otherwise.
|
| 39 |
+
This allows a non-static member to be ordered with respect to a
|
| 40 |
+
nonmember function and for the results to be equivalent to the ordering
|
| 41 |
+
of two equivalent nonmembers.
|
| 42 |
|
| 43 |
``` cpp
|
| 44 |
struct A { };
|
| 45 |
template<class T> struct B {
|
| 46 |
template<class R> int operator*(R&); // #1
|