From Jason Turner

[meta.trans.other]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpxgys2n42/{from.md → to.md} +14 -12
tmp/tmpxgys2n42/{from.md → to.md} RENAMED
@@ -1,7 +1,10 @@
1
  #### Other transformations <a id="meta.trans.other">[[meta.trans.other]]</a>
2
 
 
 
 
3
  [*Note 1*: The compilation of the expression can result in side effects
4
  such as the instantiation of class template specializations and function
5
  template specializations, the generation of implicitly-defined
6
  functions, and so on. Such side effects are not in the “immediate
7
  context” and can result in the program being ill-formed. — *end note*]
@@ -42,13 +45,13 @@ Given types `A` and `B`, let `X` be `remove_reference_t<A>`, let `Y` be
42
  - Otherwise, `COMMON-REF(A, B)` is ill-formed.
43
 
44
  If any of the types computed above is ill-formed, then
45
  `COMMON-REF(A, B)` is ill-formed.
46
 
47
- Note A: For the `common_type` trait applied to a template parameter pack
48
- `T` of types, the member `type` shall be either defined or not present
49
- as follows:
50
 
51
  - If `sizeof...(T)` is zero, there shall be no member `type`.
52
  - If `sizeof...(T)` is one, let `T0` denote the sole type constituting
53
  the pack `T`. The member *typedef-name* `type` shall denote the same
54
  type, if any, as `common_type_t<T0, T0>`; otherwise there shall be no
@@ -79,15 +82,14 @@ as follows:
79
  constituting `T`. Let `C` denote the same type, if any, as
80
  `common_type_t<T1, T2>`. If there is such a type `C`, the member
81
  *typedef-name* `type` shall denote the same type, if any, as
82
  `common_type_t<C, R...>`. Otherwise, there shall be no member `type`.
83
 
84
- Note B: Notwithstanding the provisions of [[meta.type.synop]], and
85
- pursuant to [[namespace.std]], a program may specialize
86
- `common_type<T1, T2>` for types `T1` and `T2` such that
87
- `is_same_v<T1, decay_t<T1>>` and `is_same_v<T2, decay_t<T2>>` are each
88
- `true`.
89
 
90
  [*Note 3*: Such specializations are needed when only explicit
91
  conversions are desired between the template arguments. — *end note*]
92
 
93
  Such a specialization need not have a member named `type`, but if it
@@ -95,12 +97,12 @@ does, the *qualified-id* `common_type<T1, T2>::type` shall denote a
95
  cv-unqualified non-reference type to which each of the types `T1` and
96
  `T2` is explicitly convertible. Moreover, `common_type_t<T1, T2>` shall
97
  denote the same type, if any, as does `common_type_t<T2, T1>`. No
98
  diagnostic is required for a violation of this Note’s rules.
99
 
100
- Note C: For the `common_reference` trait applied to a parameter pack `T`
101
- of types, the member `type` shall be either defined or not present as
102
  follows:
103
 
104
  - If `sizeof...(T)` is zero, there shall be no member `type`.
105
  - Otherwise, if `sizeof...(T)` is one, let `T0` denote the sole type in
106
  the pack `T`. The member typedef `type` shall denote the same type as
@@ -126,12 +128,12 @@ follows:
126
  `common_reference_t<T1, T2>`. Then:
127
  - If there is such a type `C`, the member typedef `type` shall denote
128
  the same type, if any, as `common_reference_t<C, Rest...>`.
129
  - Otherwise, there shall be no member `type`.
130
 
131
- Note D: Notwithstanding the provisions of [[meta.type.synop]], and
132
- pursuant to [[namespace.std]], a program may partially specialize
133
  `basic_common_reference<T, U, TQual, UQual>` for types `T` and `U` such
134
  that `is_same_v<T, decay_t<T>>` and `is_same_v<U, decay_t<U>>` are each
135
  `true`.
136
 
137
  [*Note 4*: Such specializations can be used to influence the result of
 
1
  #### Other transformations <a id="meta.trans.other">[[meta.trans.other]]</a>
2
 
3
+ The templates specified in [[meta.trans.other]] perform other
4
+ modifications of a type.
5
+
6
  [*Note 1*: The compilation of the expression can result in side effects
7
  such as the instantiation of class template specializations and function
8
  template specializations, the generation of implicitly-defined
9
  functions, and so on. Such side effects are not in the “immediate
10
  context” and can result in the program being ill-formed. — *end note*]
 
45
  - Otherwise, `COMMON-REF(A, B)` is ill-formed.
46
 
47
  If any of the types computed above is ill-formed, then
48
  `COMMON-REF(A, B)` is ill-formed.
49
 
50
+ For the `common_type` trait applied to a template parameter pack `T` of
51
+ types, the member `type` shall be either defined or not present as
52
+ follows:
53
 
54
  - If `sizeof...(T)` is zero, there shall be no member `type`.
55
  - If `sizeof...(T)` is one, let `T0` denote the sole type constituting
56
  the pack `T`. The member *typedef-name* `type` shall denote the same
57
  type, if any, as `common_type_t<T0, T0>`; otherwise there shall be no
 
82
  constituting `T`. Let `C` denote the same type, if any, as
83
  `common_type_t<T1, T2>`. If there is such a type `C`, the member
84
  *typedef-name* `type` shall denote the same type, if any, as
85
  `common_type_t<C, R...>`. Otherwise, there shall be no member `type`.
86
 
87
+ Notwithstanding the provisions of [[meta.rqmts]], and pursuant to
88
+ [[namespace.std]], a program may specialize `common_type<T1, T2>` for
89
+ types `T1` and `T2` such that `is_same_v<T1, decay_t<T1>>` and
90
+ `is_same_v<T2, decay_t<T2>>` are each `true`.
 
91
 
92
  [*Note 3*: Such specializations are needed when only explicit
93
  conversions are desired between the template arguments. — *end note*]
94
 
95
  Such a specialization need not have a member named `type`, but if it
 
97
  cv-unqualified non-reference type to which each of the types `T1` and
98
  `T2` is explicitly convertible. Moreover, `common_type_t<T1, T2>` shall
99
  denote the same type, if any, as does `common_type_t<T2, T1>`. No
100
  diagnostic is required for a violation of this Note’s rules.
101
 
102
+ For the `common_reference` trait applied to a parameter pack `T` of
103
+ types, the member `type` shall be either defined or not present as
104
  follows:
105
 
106
  - If `sizeof...(T)` is zero, there shall be no member `type`.
107
  - Otherwise, if `sizeof...(T)` is one, let `T0` denote the sole type in
108
  the pack `T`. The member typedef `type` shall denote the same type as
 
128
  `common_reference_t<T1, T2>`. Then:
129
  - If there is such a type `C`, the member typedef `type` shall denote
130
  the same type, if any, as `common_reference_t<C, Rest...>`.
131
  - Otherwise, there shall be no member `type`.
132
 
133
+ Notwithstanding the provisions of [[meta.rqmts]], and pursuant to
134
+ [[namespace.std]], a program may partially specialize
135
  `basic_common_reference<T, U, TQual, UQual>` for types `T` and `U` such
136
  that `is_same_v<T, decay_t<T>>` and `is_same_v<U, decay_t<U>>` are each
137
  `true`.
138
 
139
  [*Note 4*: Such specializations can be used to influence the result of