diff --git a/source/meta.tex b/source/meta.tex index f0bd37f53d..30dee178d2 100644 --- a/source/meta.tex +++ b/source/meta.tex @@ -69,6 +69,47 @@ \end{note} \end{itemdescr} +\rSec2[intseq.binding]{Structured binding support} + +\indexlibraryglobal{tuple_size}% +\indexlibraryglobal{tuple_element}% +\begin{itemdecl} +template + struct tuple_size> + : integral_constant { }; + +template + struct tuple_element> { + using type = T; + }; +template + struct tuple_element> { + using type = T; + }; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\mandates +$\tcode{I} < \tcode{sizeof...(Values)}$. +\end{itemdescr} + +\indexlibrarymember{get}{integer_sequence}% +\begin{itemdecl} +template + constexpr T get(integer_sequence) noexcept; +\end{itemdecl} + +\begin{itemdescr} +\pnum +\mandates +$\tcode{I} < \tcode{sizeof...(Values)}$. + +\pnum +\returns +\tcode{Values...[I]}. +\end{itemdescr} + \rSec1[type.traits]{Metaprogramming and type traits} \rSec2[type.traits.general]{General} diff --git a/source/support.tex b/source/support.tex index b6f6be77af..44911a9809 100644 --- a/source/support.tex +++ b/source/support.tex @@ -725,7 +725,7 @@ #define @\defnlibxname{cpp_lib_inplace_vector}@ 202406L // also in \libheader{inplace_vector} #define @\defnlibxname{cpp_lib_int_pow2}@ 202002L // freestanding, also in \libheader{bit} #define @\defnlibxname{cpp_lib_integer_comparison_functions}@ 202002L // also in \libheader{utility} -#define @\defnlibxname{cpp_lib_integer_sequence}@ 201304L // freestanding, also in \libheader{utility} +#define @\defnlibxname{cpp_lib_integer_sequence}@ 202511L // freestanding, also in \libheader{utility} #define @\defnlibxname{cpp_lib_integral_constant_callable}@ 201304L // freestanding, also in \libheader{type_traits} #define @\defnlibxname{cpp_lib_interpolate}@ 201902L // also in \libheader{cmath}, \libheader{numeric} #define @\defnlibxname{cpp_lib_invoke}@ 201411L // freestanding, also in \libheader{functional} diff --git a/source/utilities.tex b/source/utilities.tex index f704f0dae7..f796c815ca 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -114,6 +114,21 @@ template using index_sequence_for = make_index_sequence; + template struct tuple_size; + template struct tuple_element; + + // \ref{intseq.binding}, structured binding support + template + struct tuple_size>; + + template + struct tuple_element>; + template + struct tuple_element>; + + template + constexpr T get(integer_sequence) noexcept; + // \ref{pairs}, class template \tcode{pair} template struct pair; @@ -151,9 +166,6 @@ constexpr @\seebelow@ make_pair(T1&&, T2&&); // \ref{pair.astuple}, tuple-like access to pair - template struct tuple_size; - template struct tuple_element; - template struct tuple_size>; template struct tuple_element>;