Header file range/v3/algorithm/permutation.hpp

#include <meta/meta.hpp>

#include <range/v3/range_fwd.hpp>

#include <range/v3/begin_end.hpp>

#include <range/v3/range_concepts.hpp>

#include <range/v3/range_traits.hpp>

#include <range/v3/distance.hpp>

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

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

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

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

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

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

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

namespace ranges
{
    inline namespace v3
    {
        template <typename I1, typename I2, typename C = equal_to, typename P1 = ident, typename P2 = ident>
        using IsPermutationable = meta::strict_and<ForwardIterator<I1>, ForwardIterator<I2>, Comparable<I1, I2, C, P1, P2>>;
        
        struct is_permutation_fn;
        
        inline namespace 
        {
            constexpr auto& is_permutation = static_const<with_braced_init_args<is_permutation_fn>>::value;
        }
        
        struct next_permutation_fn
        {
            template <typename I, typename S, typename C = ordered_less, typename P = ident, int _concept_requires_207 = 42, typename std::enable_if<(_concept_requires_207==43)||(BidirectionalIterator<I>()&&Sentinel<S, I>()&&Sortable<I, C, P>()), int>::type=0>
            bool operator()(I begin, S end_, C pred_ = C{}, P proj_ = P{}) const;
            
            template <typename Rng, typename C = ordered_less, typename P = ident, typename I = range_iterator_t<Rng>, int _concept_requires_239 = 42, typename std::enable_if<(_concept_requires_239==43)||(BidirectionalRange<Rng>()&&Sortable<I, C, P>()), int>::type=0>
            bool operator()(Rng&& rng, C pred = C{}, P proj = P{}) const;
        };
        
        inline namespace 
        {
            constexpr auto& next_permutation = static_const<with_braced_init_args<next_permutation_fn>>::value;
        }
        
        struct prev_permutation_fn
        {
            template <typename I, typename S, typename C = ordered_less, typename P = ident, int _concept_requires_254 = 42, typename std::enable_if<(_concept_requires_254==43)||(BidirectionalIterator<I>()&&Sentinel<S, I>()&&Sortable<I, C, P>()), int>::type=0>
            bool operator()(I begin, S end_, C pred_ = C{}, P proj_ = P{}) const;
            
            template <typename Rng, typename C = ordered_less, typename P = ident, typename I = range_iterator_t<Rng>, int _concept_requires_286 = 42, typename std::enable_if<(_concept_requires_286==43)||(BidirectionalRange<Rng>()&&Sortable<I, C, P>()), int>::type=0>
            bool operator()(Rng&& rng, C pred = C{}, P proj = P{}) const;
        };
        
        inline namespace 
        {
            constexpr auto& prev_permutation = static_const<with_braced_init_args<prev_permutation_fn>>::value;
        }
    }
}

Class ranges::v3::is_permutation_fn

struct is_permutation_fn
{
    template <typename I1, typename S1, typename I2, typename C = equal_to, typename P1 = ident, typename P2 = ident, int _concept_requires_107 = 42, typename std::enable_if<(_concept_requires_107==43)||(Sentinel<S1, I1>()&&IsPermutationable<I1, I2, C, P1, P2>()), int>::type=0>
    bool operator()(I1 begin1, S1 end1, I2 begin2, C pred_ = C{}, P1 proj1_ = P1{}, P2 proj2_ = P2{}) const;
    
    template <typename I1, typename S1, typename I2, typename S2, typename C = equal_to, typename P1 = ident, typename P2 = ident, int _concept_requires_156 = 42, typename std::enable_if<(_concept_requires_156==43)||(Sentinel<S1, I1>()&&Sentinel<S2, I2>()&&IsPermutationable<I1, I2, C, P1, P2>()), int>::type=0>
    bool operator()(I1 begin1, S1 end1, I2 begin2, S2 end2, C pred = C{}, P1 proj1 = P1{}, P2 proj2 = P2{}) const;
    
    template <typename Rng1, typename I2Ref, typename C = equal_to, typename P1 = ident, typename P2 = ident, typename I1 = range_iterator_t<Rng1>, typename I2 = uncvref_t<I2Ref>, int _concept_requires_173 = 42, typename std::enable_if<(_concept_requires_173==43)||(ForwardRange<Rng1>()&&Iterator<I2>()&&IsPermutationable<I1, I2, C, P1, P2>()), int>::type=0>
    bool operator()(Rng1&& rng1, I2Ref&& begin2, C pred = C{}, P1 proj1 = P1{}, P2 proj2 = P2{}) const;
    
    template <typename Rng1, typename Rng2, typename C = equal_to, typename P1 = ident, typename P2 = ident, typename I1 = range_iterator_t<Rng1>, typename I2 = range_iterator_t<Rng2>, int _concept_requires_185 = 42, typename std::enable_if<(_concept_requires_185==43)||(ForwardRange<Rng1>()&&ForwardRange<Rng2>()&&IsPermutationable<I1, I2, C, P1, P2>()), int>::type=0>
    bool operator()(Rng1&& rng1, Rng2&& rng2, C pred = C{}, P1 proj1 = P1{}, P2 proj2 = P2{}) const;
};

@{


Variable ranges::v3::is_permutation

constexpr auto& is_permutation = static_const<with_braced_init_args<is_permutation_fn>>::value;

is_permutation_fn


Variable ranges::v3::next_permutation

constexpr auto& next_permutation = static_const<with_braced_init_args<next_permutation_fn>>::value;

next_permutation_fn


Variable ranges::v3::prev_permutation

constexpr auto& prev_permutation = static_const<with_braced_init_args<prev_permutation_fn>>::value;

prev_permutation_fn