[tuple.apply] # 22 General utilities library [[utilities]](./#utilities) ## 22.4 Tuples [[tuple]](tuple#apply) ### 22.4.6 Calling a function with a tuple of arguments [tuple.apply] [🔗](#lib:apply) `template constexpr apply_result_t apply(F&& f, Tuple&& t) noexcept(is_nothrow_applicable_v); ` [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L2695) *Effects*: Given the exposition-only function template:namespace std {templateconstexpr decltype(auto) *apply-impl*(F&& f, Tuple&& t, index_sequence) {// *exposition only*return *INVOKE*(std::forward(f), get(std::forward(t))...); // see [[func.require]](func.require "22.10.4 Requirements")}} Equivalent to:return *apply-impl*(std::forward(f), std::forward(t), make_index_sequence>>{}); [🔗](#lib:make_from_tuple) `template constexpr T make_from_tuple(Tuple&& t); ` [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L2721) *Mandates*: If tuple_size_v> is 1, thenreference_constructs_from_temporary_v(declval()))> is false[.](#2.sentence-1) [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L2728) *Effects*: Given the exposition-only function template:namespace std {templaterequires is_constructible_v(declval()))...>constexpr T *make-from-tuple-impl*(Tuple&& t, index_sequence) { // *exposition only*return T(get(std::forward(t))...); }} Equivalent to:return *make-from-tuple-impl*( std::forward(t), make_index_sequence>>{}); [*Note [1](#note-1)*: The type of T must be supplied as an explicit template parameter, as it cannot be deduced from the argument list[.](#3.sentence-2) — *end note*]