Header file range/v3/view/for_each.hpp

#include <meta/meta.hpp>

#include <range/v3/range_fwd.hpp>

#include <range/v3/view/view.hpp>

#include <range/v3/view/all.hpp>

#include <range/v3/view/join.hpp>

#include <range/v3/view/generate_n.hpp>

#include <range/v3/view/repeat_n.hpp>

#include <range/v3/view/single.hpp>

#include <range/v3/view/transform.hpp>

#include <range/v3/utility/functional.hpp>

#include <range/v3/utility/static_const.hpp>

namespace ranges
{
    inline namespace v3
    {
        template <typename Rng, typename F>
        struct for_each_view;
        
        namespace view
        {
            struct for_each_fn
            {
                template <typename Rng, typename F>
                using Concept = meta::and_<Range<Rng>, IndirectCallable<F, range_iterator_t<Rng>>, Range<concepts::Callable::result_t<F, range_common_reference_t<Rng>>>>;
                
                template <typename Rng, typename F, int _concept_requires_66 = 42, typename std::enable_if<(_concept_requires_66==43)||(Concept<Rng, F>()), int>::type=0>
                for_each_view<all_t<Rng>, F> operator()(Rng&& rng, F f) const;
                
                template <typename Rng, typename F, int _concept_requires_75 = 42, typename std::enable_if<(_concept_requires_75==43)||(!Concept<Rng, F>()), int>::type=0>
                void operator()(Rng&&, F) const;
            };
            
            inline namespace 
            {
                constexpr auto& for_each = static_const<view<for_each_fn>>::value;
            }
        }
        
        struct yield_fn
        {
            template <typename V, int _concept_requires_99 = 42, typename std::enable_if<(_concept_requires_99==43)||(SemiRegular<V>()), int>::type=0>
            single_view<V> operator()(V v) const;
            
            template <typename Arg, typename Val = detail::decay_t<Arg>, int _concept_requires_107 = 42, typename std::enable_if<(_concept_requires_107==43)||(!(SemiRegular<Val>()&&Constructible<Val, Arg&&>())), int>::type=0>
            void operator()(Arg&&) const;
        };
        
        inline namespace 
        {
            constexpr auto& yield = static_const<yield_fn>::value;
        }
        
        struct yield_from_fn
        {
            template <typename Rng, int _concept_requires_127 = 42, typename std::enable_if<(_concept_requires_127==43)||(View<Rng>()), int>::type=0>
            Rng operator()(Rng rng) const;
        };
        
        inline namespace 
        {
            constexpr auto& yield_from = static_const<yield_from_fn>::value;
        }
        
        struct yield_if_fn
        {
            template <typename V>
            repeat_n_view<V> operator()(bool b, V v) const;
        };
        
        inline namespace 
        {
            constexpr auto& yield_if = static_const<yield_if_fn>::value;
        }
        
        struct lazy_yield_if_fn
        {
            template <typename F>
            generate_n_view<F> operator()(bool b, F f) const;
        };
        
        inline namespace 
        {
            constexpr auto& lazy_yield_if = static_const<lazy_yield_if_fn>::value;
        }
        
        template <typename Rng, typename Fun, typename Result = concepts::Function::result_t<Fun, range_common_reference_t<Rng>>, int _concept_requires_169 = 42, typename std::enable_if<(_concept_requires_169==43)||(Range<Rng>()&&Function<Fun, range_common_reference_t<Rng>>()&&Range<Result>()), int>::type=0>
        decltype(view::for_each(std::forward<Rng>(rng), std::move(fun))) operator>>=(Rng&& rng, Fun fun);
    }
}

Class template ranges::v3::for_each_view<Rng, F>

template <typename Rng, typename F>
struct for_each_view
: join_view<transform_view<Rng, F> >
{
    for_each_view() = default;
    
    for_each_view(Rng rng, F f);
};

@{