Annex D (normative) Compatibility features [depr]

D.18 Tuple [depr.tuple]

The header <tuple> has the following additions: namespace std { template<class T> class tuple_size<volatile T>; template<class T> class tuple_size<const volatile T>; template<size_t I, class T> class tuple_element<I, volatile T>; template<size_t I, class T> class tuple_element<I, const volatile T>; }
template<class T> class tuple_size<volatile T>; template<class T> class tuple_size<const volatile T>;
Let TS denote tuple_­size<T> 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 of integral_­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 <tuple> header, the two templates are available when any of the headers <array>, <ranges>, or <utility> are included.
template<size_t I, class T> class tuple_element<I, volatile T>; template<size_t I, class T> class 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<TE>, and
  • for the second specialization, add_­cv_­t<TE>.
In addition to being available via inclusion of the <tuple> header, the two templates are available when any of the headers <array>, <ranges>, or <utility> are included.