1
0
forked from boostorg/mp11

Rename make_from_tuple to construct_from_tuple

This commit is contained in:
Peter Dimov
2017-06-08 19:22:53 +03:00
parent 19865f6145
commit cae6f966dc
7 changed files with 46 additions and 44 deletions

View File

@@ -20,12 +20,13 @@ http://www.boost.org/LICENSE_1_0.txt
`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.
## make_from_tuple<T>(tp)
## construct_from_tuple<T>(tp)
template<class T, class Tp> T make_from_tuple(Tp&& tp);
template<class T, class Tp> T construct_from_tuple(Tp&& tp);
`make_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.
`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 {cpp}17.
The name of the function doesn't match the {cpp}17 one to avoid ambiguities when both are visible or in unqualified calls.
## tuple_for_each(tp, f)