diff --git a/source/utilities.tex b/source/utilities.tex index c64bb736ce..56d9e51219 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -852,16 +852,16 @@ \indexlibrary{\idxcode{make_pair}}% \begin{itemdecl} template - constexpr pair make_pair(T1&& x, T2&& y); + constexpr pair, unwrap_ref_decay_t> make_pair(T1&& x, T2&& y); \end{itemdecl} \begin{itemdescr} \pnum -\returns \tcode{pair(std::forward(x), std::forward(y))}, -where \tcode{V1} and \tcode{V2} are determined as follows: Let \tcode{Ui} be -\tcode{decay_t} for each \tcode{Ti}. If \tcode{Ui} is a specialization -of \tcode{reference_wrapper}, then \tcode{Vi} is \tcode{Ui::type\&}, -otherwise \tcode{Vi} is \tcode{Ui}. +\returns +\begin{codeblock} +pair, + unwrap_ref_decay_t>(std::forward(x), std::forward(y)) +\end{codeblock} \end{itemdescr} \pnum @@ -999,7 +999,7 @@ inline constexpr @\unspec@ ignore; template - constexpr tuple make_tuple(TTypes&&...); + constexpr tuple...> make_tuple(TTypes&&...); template constexpr tuple forward_as_tuple(TTypes&&...) noexcept; @@ -1610,18 +1610,12 @@ \indexlibrary{\idxcode{tuple}!\idxcode{make_tuple}}% \begin{itemdecl} template - constexpr tuple make_tuple(TTypes&&... t); + constexpr tuple...> make_tuple(TTypes&&... t); \end{itemdecl} \begin{itemdescr} \pnum -The pack \tcode{VTypes} is defined as follows. Let \tcode{U}$_i$ be \tcode{decay_t} for each -\tcode{T}$_i$ in \tcode{TTypes}. If \tcode{U}$_i$ is a specialization of -\tcode{reference_wrapper}, then \tcode{V}$_i$ in \tcode{VTypes} is \tcode{U$_i$::type\&}, -otherwise \tcode{V}$_i$ is \tcode{U}$_i$. - -\pnum -\returns \tcode{tuple(std::forward(t)...)}. +\returns \tcode{tuple...>(std::forward(t)...)}. \pnum \begin{example} @@ -13033,6 +13027,8 @@ \rSec2[functional.syn]{Header \tcode{} synopsis} \indexhdr{functional}% +\indexlibrary{\idxcode{unwrap_ref_decay}}% +\indexlibrary{\idxcode{unwrap_ref_decay_t}}% \begin{codeblock} namespace std { // \ref{func.invoke}, invoke @@ -13051,6 +13047,10 @@ template reference_wrapper ref(reference_wrapper) noexcept; template reference_wrapper cref(reference_wrapper) noexcept; + template struct unwrap_reference; + template struct unwrap_ref_decay : unwrap_reference> {}; + template using unwrap_ref_decay_t = typename unwrap_ref_decay::type; + // \ref{arithmetic.operations}, arithmetic operations template struct plus; template struct minus; @@ -13407,7 +13407,6 @@ \pnum\returns The stored reference. \end{itemdescr} - \rSec3[refwrap.invoke]{Invocation} \indexlibrarymember{operator()}{reference_wrapper}% @@ -13460,6 +13459,20 @@ \pnum\returns \tcode{cref(t.get())}. \end{itemdescr} +\rSec3[refwrap.unwrapref]{Transformation type trait \tcode{unwrap_reference}} + +\indexlibrary{\idxcode{unwrap_reference}}% +\begin{itemdecl} +template + struct unwrap_reference; +\end{itemdecl} + +\pnum +If \tcode{T} is +a specialization \tcode{reference_wrapper} for some type \tcode{X}, +the member typedef \tcode{type} of \tcode{unwrap_reference} is \tcode{X\&}, +otherwise it is \tcode{T}. + \rSec2[arithmetic.operations]{Arithmetic operations} \pnum