1
0
forked from boostorg/mp11
Files
boost_mp11/doc/mp11/tuple_for_each.qbk

23 lines
754 B
Plaintext
Raw Normal View History

2017-03-16 19:45:47 +02:00
[/
/ 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]