hpx::ranges::fold_left_with_iter#
Defined in header hpx/algorithm.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
See also:
-
template<typename InIter, typename Sent, typename T, typename F>
auto hpx::ranges::fold_left_with_iter(InIter first, Sent last, T init, F f) -> fold_left_with_iter_result<InIter, std::decay_t<std::invoke_result_t<F&, T, std::iter_reference_t<InIter>>>># Left-folds a range and returns both the result and the end iterator.
- Template Parameters:
InIter – The type of the source begin iterator (deduced).
Sent – The type of the source sentinel (deduced).
T – The type of the initial value.
F – The type of the binary function object.
- Parameters:
first – Refers to the beginning of the sequence.
last – Refers to the end of the sequence.
init – The initial value for the fold operation.
f – Binary function object that will be applied.
- Returns:
A fold_left_with_iter_result containing the end iterator and the fold result.
-
template<typename Rng, typename T, typename F>
auto hpx::ranges::fold_left_with_iter(Rng &&rng, T init, F f) -> fold_left_with_iter_result<std::ranges::iterator_t<Rng>, std::decay_t<std::invoke_result_t<F&, T, std::ranges::range_reference_t<Rng>>>># Left-folds a range and returns both the result and the end iterator.
- Template Parameters:
Rng – The type of the source range (deduced).
T – The type of the initial value.
F – The type of the binary function object.
- Parameters:
rng – Refers to the sequence of elements.
init – The initial value for the fold operation.
f – Binary function object that will be applied.
- Returns:
A fold_left_with_iter_result containing the end iterator and the fold result.