tmp/tmpagewzq59/{from.md → to.md}
RENAMED
|
@@ -3,14 +3,14 @@
|
|
| 3 |
The template parameter list of a member of a class template partial
|
| 4 |
specialization shall match the template parameter list of the class
|
| 5 |
template partial specialization. The template argument list of a member
|
| 6 |
of a class template partial specialization shall match the template
|
| 7 |
argument list of the class template partial specialization. A class
|
| 8 |
-
template specialization is a distinct template. The members of
|
| 9 |
-
template partial specialization are unrelated to the members
|
| 10 |
-
primary template. Class template partial specialization members
|
| 11 |
-
used in a way that requires a definition shall be defined; the
|
| 12 |
definitions of members of the primary template are never used as
|
| 13 |
definitions for members of a class template partial specialization. An
|
| 14 |
explicit specialization of a member of a class template partial
|
| 15 |
specialization is declared in the same way as an explicit specialization
|
| 16 |
of the primary template.
|
|
@@ -43,11 +43,11 @@ int main() {
|
|
| 43 |
A<char,0> a0;
|
| 44 |
A<char,2> a2;
|
| 45 |
a0.f(); // OK, uses definition of primary template's member
|
| 46 |
a2.g(); // OK, uses definition of partial specialization's member
|
| 47 |
a2.h(); // OK, uses definition of explicit specialization's member
|
| 48 |
-
a2.f(); //
|
| 49 |
}
|
| 50 |
```
|
| 51 |
|
| 52 |
— *end example*]
|
| 53 |
|
|
|
|
| 3 |
The template parameter list of a member of a class template partial
|
| 4 |
specialization shall match the template parameter list of the class
|
| 5 |
template partial specialization. The template argument list of a member
|
| 6 |
of a class template partial specialization shall match the template
|
| 7 |
argument list of the class template partial specialization. A class
|
| 8 |
+
template partial specialization is a distinct template. The members of
|
| 9 |
+
the class template partial specialization are unrelated to the members
|
| 10 |
+
of the primary template. Class template partial specialization members
|
| 11 |
+
that are used in a way that requires a definition shall be defined; the
|
| 12 |
definitions of members of the primary template are never used as
|
| 13 |
definitions for members of a class template partial specialization. An
|
| 14 |
explicit specialization of a member of a class template partial
|
| 15 |
specialization is declared in the same way as an explicit specialization
|
| 16 |
of the primary template.
|
|
|
|
| 43 |
A<char,0> a0;
|
| 44 |
A<char,2> a2;
|
| 45 |
a0.f(); // OK, uses definition of primary template's member
|
| 46 |
a2.g(); // OK, uses definition of partial specialization's member
|
| 47 |
a2.h(); // OK, uses definition of explicit specialization's member
|
| 48 |
+
a2.f(); // error: no definition of f for A<T,2>; the primary template is not used here
|
| 49 |
}
|
| 50 |
```
|
| 51 |
|
| 52 |
— *end example*]
|
| 53 |
|