diff --git a/source/support.tex b/source/support.tex index fa649bab01..28bfb09629 100644 --- a/source/support.tex +++ b/source/support.tex @@ -625,6 +625,7 @@ #define @\defnlibxname{cpp_lib_integral_constant_callable}@ 201304L // also in \libheader{type_traits} #define @\defnlibxname{cpp_lib_interpolate}@ 201902L // also in \libheader{cmath}, \libheader{numeric} #define @\defnlibxname{cpp_lib_invoke}@ 201411L // also in \libheader{functional} +#define @\defnlibxname{cpp_lib_invoke_r}@ 202106L // also in \libheader{functional} #define @\defnlibxname{cpp_lib_is_aggregate}@ 201703L // also in \libheader{type_traits} #define @\defnlibxname{cpp_lib_is_constant_evaluated}@ 201811L // also in \libheader{type_traits} #define @\defnlibxname{cpp_lib_is_final}@ 201402L // also in \libheader{type_traits} diff --git a/source/utilities.tex b/source/utilities.tex index b6ae03661f..d2e8e155eb 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -13490,6 +13490,10 @@ constexpr invoke_result_t invoke(F&& f, Args&&... args) noexcept(is_nothrow_invocable_v); + template + constexpr R invoke_r(F&& f, Args&&... args) + noexcept(is_nothrow_invocable_r_v); + // \ref{refwrap}, \tcode{reference_wrapper} template class reference_wrapper; @@ -13793,7 +13797,7 @@ a given standard library function template have the same type if the types of their corresponding state entities are the same. -\rSec2[func.invoke]{Function template \tcode{invoke}} +\rSec2[func.invoke]{\tcode{invoke} functions} \indexlibraryglobal{invoke}% \indexlibrary{invoke@\tcode{\placeholder{INVOKE}}}% \begin{itemdecl} @@ -13803,11 +13807,32 @@ \end{itemdecl} \begin{itemdescr} +\pnum +\constraints +\tcode{is_invocable_v} is \tcode{true}. + \pnum \returns \tcode{\placeholdernc{INVOKE}(std::forward(f), std::forward(args)...)}\iref{func.require}. \end{itemdescr} +\indexlibraryglobal{invoke_r}% +\begin{itemdecl} +template + constexpr R invoke_r(F&& f, Args&&... args) + noexcept(is_nothrow_invocable_r_v); +\end{itemdecl} + +\begin{itemdescr} +\pnum +\constraints +\tcode{is_invocable_r_v} is \tcode{true}. + +\pnum +\returns +\tcode{\placeholdernc{INVOKE}(std::forward(f), std::forward(args)...)}\iref{func.require}. +\end{itemdescr} + \rSec2[refwrap]{Class template \tcode{reference_wrapper}} \rSec3[refwrap.general]{General}