Header file range/v3/view/group_by.hpp

#include <meta/meta.hpp>

#include <range/v3/range_fwd.hpp>

#include <range/v3/begin_end.hpp>

#include <range/v3/iterator_range.hpp>

#include <range/v3/range_traits.hpp>

#include <range/v3/range_concepts.hpp>

#include <range/v3/view_facade.hpp>

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

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

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

#include <range/v3/algorithm/adjacent_find.hpp>

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

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

namespace ranges
{
    inline namespace v3
    {
        template <typename Rng, typename Fun>
        struct group_by_view;
        
        namespace view
        {
            struct group_by_fn
            {
                template <typename Rng, typename Fun>
                using Concept = meta::and_<ForwardRange<Rng>, IndirectCallablePredicate<Fun, range_iterator_t<Rng>, range_iterator_t<Rng>>>;
                
                template <typename Rng, typename Fun, int _concept_requires_134 = 42, typename std::enable_if<(_concept_requires_134==43)||(Concept<Rng, Fun>()), int>::type=0>
                group_by_view<all_t<Rng>, Fun> operator()(Rng&& rng, Fun fun) const;
                
                template <typename Rng, typename Fun, int _concept_requires_142 = 42, typename std::enable_if<(_concept_requires_142==43)||(!Concept<Rng, Fun>()), int>::type=0>
                void operator()(Rng&&, Fun) const;
            };
            
            inline namespace 
            {
                constexpr auto& group_by = static_const<view<group_by_fn>>::value;
            }
        }
    }
}

Class template ranges::v3::group_by_view<Rng, Fun>

template <typename Rng, typename Fun>
struct group_by_view
: view_facade<group_by_view<Rng, Fun>, is_finite<Rng>::value ? finite : range_cardinality<Rng>::value>
{
    group_by_view() = default;
    
    group_by_view(Rng rng, Fun fun);
};

@{