Header file range/v3/algorithm/stable_sort.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/utility/memory.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/functional.hpp>

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

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

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

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

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

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

namespace ranges
{
    inline namespace v3
    {
        struct stable_sort_fn;
        
        inline namespace 
        {
            constexpr auto& stable_sort = static_const<with_braced_init_args<stable_sort_fn>>::value;
        }
    }
}

Class ranges::v3::stable_sort_fn

struct stable_sort_fn
{
    template <typename I, typename C, typename P>
    static void inplace_stable_sort(I begin, I end, C& pred, P& proj);
    
    template <typename I1, typename I2, typename D, typename C, typename P>
    static void merge_sort_loop(I1 begin, I1 end, I2 result, D step_size, C& pred, P& proj);
    
    static constexpr int merge_sort_chunk_size();
    
    template <typename I, typename D, typename C, typename P>
    static void chunk_insertion_sort(I begin, I end, D chunk_size, C& pred, P& proj);
    
    template <typename I, typename V, typename C, typename P>
    static void merge_sort_with_buffer(I begin, I end, V* buffer, C& pred, P& proj);
    
    template <typename I, typename V, typename D, typename C, typename P>
    static void stable_sort_adaptive(I begin, I end, V* buffer, D buffer_size, C& pred, P& proj);
    
    template <typename I, typename S, typename C = ordered_less, typename P = ident, int _concept_requires_158 = 42, typename std::enable_if<(_concept_requires_158==43)||(Sortable<I, C, P>()&&RandomAccessIterator<I>()&&Sentinel<S, I>()), int>::type=0>
    I 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_179 = 42, typename std::enable_if<(_concept_requires_179==43)||(Sortable<I, C, P>()&&RandomAccessRange<Rng>()), int>::type=0>
    range_safe_iterator_t<Rng> operator()(Rng&& rng, C pred = C{}, P proj = P{}) const;
};

@{


Variable ranges::v3::stable_sort

constexpr auto& stable_sort = static_const<with_braced_init_args<stable_sort_fn>>::value;

stable_sort_fn