forked from boostorg/mp11
23 lines
754 B
Plaintext
23 lines
754 B
Plaintext
[/
|
|
/ Copyright 2017 Peter Dimov
|
|
/
|
|
/ Distributed under the Boost Software License, Version 1.0. (See
|
|
/ accompanying file LICENSE_1_0.txt or copy at
|
|
/ http://www.boost.org/LICENSE_1_0.txt)
|
|
/]
|
|
|
|
[section:tuple_for_each A "for each" algorithm for tuple-like types, `<boost/tuple_for_each.hpp>`]
|
|
|
|
The contents of this header are defined in namespace `boost`.
|
|
|
|
[section `tuple_for_each`]
|
|
template<class Tp, class F> constexpr F tuple_for_each(Tp&& tp, F&& f);
|
|
|
|
`tuple_for_each(tp, f)` applies the function object `f` to each element of `tp` by evaluating the
|
|
expression `f(std::get<J>(std::forward<Tp>(tp)))` for `J` in 0..`N-1`, where `N` is `std::tuple_size<std::remove_reference_t<Tp>>::value`.
|
|
|
|
Returns `std::forward<F>(f)`.
|
|
[endsect]
|
|
|
|
[endsect]
|