template<class F, class Tp> constexpr /*...*/ tuple_apply(F&& f, Tp&& tp);+
diff --git a/README.md b/README.md index 05119f5..5861ed5 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Tested on [Travis](https://travis-ci.org/pdimov/mp11/) and [Appveyor](https://ci * [Integer Sequences](doc/mp11/integer_sequence.adoc) -* [A "for each" algorithm for tuple-like types](doc/mp11/tuple_for_each.adoc) +* [Tuple Operations](doc/mp11/tuple.adoc) ## License diff --git a/doc/html/mp11.html b/doc/html/mp11.html index 2a9c058..0fb5124 100644 --- a/doc/html/mp11.html +++ b/doc/html/mp11.html @@ -589,8 +589,10 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
U…
and the mp_bind
expressions replace
template<class F, class Tp> constexpr /*...*/ tuple_apply(F&& f, Tp&& tp);+
tuple_apply(f, tp)
returns std::forward<F>(f)(std::get<J>(std::forward<Tp>(tp))…)
for J
in 0..N-1
,
+where N
is std::tuple_size<typename std::remove_reference<Tp>::type>::value
. Same as std::apply
in C++17.
template<class T, class Tp> T construct_from_tuple(Tp&& tp);+
construct_from_tuple<T>(tp)
returns T(std::get<J>(std::forward<Tp>(tp))…)
for J
in 0..N-1
,
+where N
is std::tuple_size<typename std::remove_reference<Tp>::type>::value
. Same as std::make_from_tuple
in C++17.
+The name of the function doesn’t match the C++17 one to avoid ambiguities when both are visible or in unqualified calls.
f(std::get<J>(std::forward<Tp>(tp)))
for