Range-v3
Range algorithms, views, and actions for the Standard Library
ranges::v3::view::for_each_fn Struct Reference

Description

Lazily applies an unary function to each element in the source range that returns another range (possibly empty), flattening the result.

Synopsis of methods

constexpr view< for_each_fnfor_each {}
 

Public Types

template<typename Rng , typename Fun >
using Concept = concepts::models< Concept_, Rng, Fun >
 

Public Member Functions

template<typename Rng , typename Fun , requires = (Concept<Rng, Fun>())>
auto operator() (Rng &&rng, Fun fun) const -> decltype(join(transform(static_cast< Rng &&>(rng), std::move(fun))))