tmp/tmpysyc0j_6/{from.md → to.md}
RENAMED
|
@@ -6,30 +6,32 @@ Two *template-id*s refer to the same class, function, or variable if
|
|
| 6 |
*literal-operator-id*s refer to the same template and
|
| 7 |
- their corresponding type *template-argument*s are the same type and
|
| 8 |
- their corresponding non-type template arguments of integral or
|
| 9 |
enumeration type have identical values and
|
| 10 |
- their corresponding non-type *template-argument*s of pointer type
|
| 11 |
-
refer to the same
|
| 12 |
-
|
| 13 |
- their corresponding non-type *template-argument*s of pointer-to-member
|
| 14 |
type refer to the same class member or are both the null member
|
| 15 |
pointer value and
|
| 16 |
- their corresponding non-type *template-argument*s of reference type
|
| 17 |
-
refer to the same
|
| 18 |
- their corresponding template *template-argument*s refer to the same
|
| 19 |
template.
|
| 20 |
|
|
|
|
|
|
|
| 21 |
``` cpp
|
| 22 |
-
template<class E, int size> class buffer {
|
| 23 |
buffer<char,2*512> x;
|
| 24 |
buffer<char,1024> y;
|
| 25 |
```
|
| 26 |
|
| 27 |
declares `x` and `y` to be of the same type, and
|
| 28 |
|
| 29 |
``` cpp
|
| 30 |
-
template<class T, void(*err_fct)()> class list {
|
| 31 |
list<int,&error_handler1> x1;
|
| 32 |
list<int,&error_handler2> x2;
|
| 33 |
list<int,&error_handler2> x3;
|
| 34 |
list<char,&error_handler2> x4;
|
| 35 |
```
|
|
@@ -45,11 +47,15 @@ X<Y<int> > y;
|
|
| 45 |
X<Z<int> > z;
|
| 46 |
```
|
| 47 |
|
| 48 |
declares `y` and `z` to be of the same type.
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
|
|
|
| 6 |
*literal-operator-id*s refer to the same template and
|
| 7 |
- their corresponding type *template-argument*s are the same type and
|
| 8 |
- their corresponding non-type template arguments of integral or
|
| 9 |
enumeration type have identical values and
|
| 10 |
- their corresponding non-type *template-argument*s of pointer type
|
| 11 |
+
refer to the same object or function or are both the null pointer
|
| 12 |
+
value and
|
| 13 |
- their corresponding non-type *template-argument*s of pointer-to-member
|
| 14 |
type refer to the same class member or are both the null member
|
| 15 |
pointer value and
|
| 16 |
- their corresponding non-type *template-argument*s of reference type
|
| 17 |
+
refer to the same object or function and
|
| 18 |
- their corresponding template *template-argument*s refer to the same
|
| 19 |
template.
|
| 20 |
|
| 21 |
+
[*Example 1*:
|
| 22 |
+
|
| 23 |
``` cpp
|
| 24 |
+
template<class E, int size> class buffer { ... };
|
| 25 |
buffer<char,2*512> x;
|
| 26 |
buffer<char,1024> y;
|
| 27 |
```
|
| 28 |
|
| 29 |
declares `x` and `y` to be of the same type, and
|
| 30 |
|
| 31 |
``` cpp
|
| 32 |
+
template<class T, void(*err_fct)()> class list { ... };
|
| 33 |
list<int,&error_handler1> x1;
|
| 34 |
list<int,&error_handler2> x2;
|
| 35 |
list<int,&error_handler2> x3;
|
| 36 |
list<char,&error_handler2> x4;
|
| 37 |
```
|
|
|
|
| 47 |
X<Z<int> > z;
|
| 48 |
```
|
| 49 |
|
| 50 |
declares `y` and `z` to be of the same type.
|
| 51 |
|
| 52 |
+
— *end example*]
|
| 53 |
+
|
| 54 |
+
If an expression e is type-dependent ([[temp.dep.expr]]), `decltype(e)`
|
| 55 |
+
denotes a unique dependent type. Two such *decltype-specifier*s refer to
|
| 56 |
+
the same type only if their *expression*s are equivalent (
|
| 57 |
+
[[temp.over.link]]).
|
| 58 |
+
|
| 59 |
+
[*Note 1*: However, such a type may be aliased, e.g., by a
|
| 60 |
+
*typedef-name*. — *end note*]
|
| 61 |
|