[depr.tuple]

# Annex D (normative) Compatibility features [[depr]](./#depr)

## D.15 Tuple [depr.tuple]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L523)

The header [<tuple>](tuple.syn#header:%3ctuple%3e "22.4.2 Header <tuple> synopsis [tuple.syn]") has the following additions:namespace std {template<class T> struct tuple_size<volatile T>; template<class T> struct tuple_size<const volatile T>; 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>;}

[ð](#itemdecl:1)

`template<class T> struct tuple_size<volatile T>;
template<class T> struct tuple_size<const volatile T>;
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L541)

Let TS denote tuple_size<T> of the cv-unqualified type T[.](#2.sentence-1)

If the expression TS​::​value is well-formed
when treated as an [unevaluated operand](expr.context#def:unevaluated_operand "7.2.3 Context dependence [expr.context]"),
then specializations of each of the two templates meet
the [*Cpp17TransformationTrait*](meta.rqmts#:Cpp17TransformationTrait "21.3.2 Requirements [meta.rqmts]") requirements with a base characteristic ofintegral_constant<size_t, TS​::​value>[.](#2.sentence-2)

Otherwise, they have no member value[.](#2.sentence-3)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L550)

Access checking is performed as if
in a context unrelated to TS and T[.](#3.sentence-1)

Only the validity of the immediate context of the expression is considered[.](#3.sentence-2)

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L555)

In addition to being available via inclusion of the [<tuple>](tuple.syn#header:%3ctuple%3e "22.4.2 Header <tuple> synopsis [tuple.syn]") header,
the two templates are available when any of the headers[<array>](array.syn#header:%3carray%3e "23.3.2 Header <array> synopsis [array.syn]"),[<ranges>](ranges.syn#header:%3cranges%3e "25.2 Header <ranges> synopsis [ranges.syn]"), or[<utility>](utility.syn#header:%3cutility%3e "22.2.1 Header <utility> synopsis [utility.syn]") are included[.](#4.sentence-1)

[ð](#itemdecl:2)

`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>;
`

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L570)

Let TE denote tuple_element_t<I, T> of the cv-unqualified type T[.](#5.sentence-1)

Then specializations of each of the two templates meet
the [*Cpp17TransformationTrait*](meta.rqmts#:Cpp17TransformationTrait "21.3.2 Requirements [meta.rqmts]") requirements
with a member typedef type that names the following type:

- [(5.1)](#5.1)

for the first specialization, add_volatile_t<TE>, and

- [(5.2)](#5.2)

for the second specialization, add_cv_t<TE>[.](#5.sentence-2)

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L581)

In addition to being available via inclusion of the [<tuple>](tuple.syn#header:%3ctuple%3e "22.4.2 Header <tuple> synopsis [tuple.syn]") header,
the two templates are available when any of the headers[<array>](array.syn#header:%3carray%3e "23.3.2 Header <array> synopsis [array.syn]"),[<ranges>](ranges.syn#header:%3cranges%3e "25.2 Header <ranges> synopsis [ranges.syn]"), or[<utility>](utility.syn#header:%3cutility%3e "22.2.1 Header <utility> synopsis [utility.syn]") are included[.](#6.sentence-1)
