3.7 KiB
[depr.tuple]
Annex D (normative) Compatibility features [depr]
D.15 Tuple [depr.tuple]
The header has the following additions:namespace std {template struct tuple_size; template struct tuple_size; template<size_t I, class T> struct tuple_element<I, volatile T>; template<size_t I, class T> struct tuple_element<I, const volatile T>;}
template<class T> struct tuple_size<volatile T>; template<class T> struct tuple_size<const volatile T>;
Let TS denote tuple_size of the cv-unqualified type T.
If the expression TS::value is well-formed when treated as an unevaluated operand, then specializations of each of the two templates meet the Cpp17TransformationTrait requirements with a base characteristic ofintegral_constant<size_t, TS::value>.
Otherwise, they have no member value.
Access checking is performed as if in a context unrelated to TS and T.
Only the validity of the immediate context of the expression is considered.
In addition to being available via inclusion of the header, the two templates are available when any of the headers,, or are included.
template<size_t I, class T> struct tuple_element<I, volatile T>; template<size_t I, class T> struct tuple_element<I, const volatile T>;
Let TE denote tuple_element_t<I, T> of the cv-unqualified type T.
Then specializations of each of the two templates meet the Cpp17TransformationTrait requirements with a member typedef type that names the following type:
for the first specialization, add_volatile_t, and
for the second specialization, add_cv_t.
In addition to being available via inclusion of the header, the two templates are available when any of the headers,, or are included.