Header file range/v3/iterator_range.hpp

#include <meta/meta.hpp>

#include <range/v3/range_fwd.hpp>

#include <range/v3/distance.hpp>

#include <range/v3/view_interface.hpp>

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

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

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

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

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

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

namespace ranges
{
    inline namespace v3
    {
        template <typename I, typename S>
        struct iterator_range;
        
        template <typename I, typename S>
        struct sized_iterator_range
        : view_interface<sized_iterator_range<I, S> >
        {
            using iterator = I;
            
            using sentinel = S;
            
            using const_iterator = I;
            
            sized_iterator_range() = default;
            
            sized_iterator_range(I begin, S end, iterator_size_t<I> size);
            
            template <typename X, typename Y, int _concept_requires_115 = 42, typename std::enable_if<(_concept_requires_115==43)||(Constructible<I, X&&>()&&Constructible<S, Y&&>()), int>::type=0>
            sized_iterator_range(std::pair<X, Y> rng, iterator_size_t<I> size);
            
            template <typename X, typename Y, int _concept_requires_120 = 42, typename std::enable_if<(_concept_requires_120==43)||(Constructible<I, X&&>()&&Constructible<S, Y&&>()), int>::type=0>
            sized_iterator_range(iterator_range<X, Y> rng, iterator_size_t<I> size);
            
            template <typename X, typename Y, int _concept_requires_125 = 42, typename std::enable_if<(_concept_requires_125==43)||(Constructible<I, X&&>()&&Constructible<S, Y&&>()), int>::type=0>
            sized_iterator_range(sized_iterator_range<X, Y> rng);
            
            template <typename X, typename Y, int _concept_requires_130 = 42, typename std::enable_if<(_concept_requires_130==43)||(Assignable<I&, X&&>()&&Assignable<S&, Y&&>()), int>::type=0>
            sized_iterator_range& operator=(sized_iterator_range<X, Y> rng);
            
            I begin() const;
            
            S end() const;
            
            iterator_size_t<I> size() const;
            
            template <typename X, typename Y, int _concept_requires_150 = 42, typename std::enable_if<(_concept_requires_150==43)||(ConvertibleTo<I, X>()&&ConvertibleTo<S, Y>()), int>::type=0>
            constexpr operator std::pair<X, Y>() const;
            
            template <typename X, typename Y, int _concept_requires_156 = 42, typename std::enable_if<(_concept_requires_156==43)||(ConvertibleTo<I, X>()&&ConvertibleTo<S, Y>()), int>::type=0>
            constexpr operator iterator_range<X, Y>() const;
            
            constexpr operator iterator_range<I, S>const&() const & noexcept;
        };
        
        struct make_iterator_range_fn
        {
            template <typename I, typename S, int _concept_requires_171 = 42, typename std::enable_if<(_concept_requires_171==43)||(Sentinel<S, I>()), int>::type=0>
            constexpr iterator_range<I, S> operator()(I begin, S end) const;
            
            template <typename I, typename S, int _concept_requires_180 = 42, typename std::enable_if<(_concept_requires_180==43)||(Sentinel<S, I>()), int>::type=0>
            constexpr sized_iterator_range<I, S> operator()(I begin, S end, iterator_size_t<I> size) const;
        };
        
        inline namespace 
        {
            constexpr auto& make_iterator_range = static_const<make_iterator_range_fn>::value;
        }
        
        template <std::size_t N, typename I, typename S, int _concept_requires_194 = 42, typename std::enable_if<(_concept_requires_194==43)||(N<2), int>::type=0>
        constexpr decltype(ranges::get<N>(static_cast<iterator_range<I, S>const&>(p))) get(sized_iterator_range<I, S>const& p);
        
        template <std::size_t N, typename I, typename S, int _concept_requires_203 = 42, typename std::enable_if<(_concept_requires_203==43)||(N==2), int>::type=0>
        constexpr iterator_size_t<I> get(sized_iterator_range<I, S>const& p);
    }
}

namespace std{}

Class template ranges::v3::iterator_range<I, S>

template <typename I, typename S>
struct iterator_range
: tagged_compressed_tuple<tag::begin (I), tag::end (S)>, view_interface<iterator_range<I, S> >
{
    using iterator = I;
    
    using sentinel = S;
    
    using const_iterator = I;
    
    using base_t::begin;
    
    using base_t::end;
    
    iterator_range() = default;
    
    constexpr iterator_range(I begin, S end);
    
    template <typename X, typename Y, int _concept_requires_58 = 42, typename std::enable_if<(_concept_requires_58==43)||(Constructible<I, X>()&&Constructible<S, Y>()), int>::type=0>
    constexpr iterator_range(iterator_range<X, Y> rng);
    
    template <typename X, typename Y, int _concept_requires_63 = 42, typename std::enable_if<(_concept_requires_63==43)||(Constructible<I, X>()&&Constructible<S, Y>()), int>::type=0>
    explicit constexpr iterator_range(std::pair<X, Y> rng);
    
    template <typename X, typename Y, int _concept_requires_68 = 42, typename std::enable_if<(_concept_requires_68==43)||(Assignable<I&, X>()&&Assignable<S&, Y>()), int>::type=0>
    iterator_range& operator=(iterator_range<X, Y> rng);
    
    template <typename X, typename Y, int _concept_requires_76 = 42, typename std::enable_if<(_concept_requires_76==43)||(ConvertibleTo<I, X>()&&ConvertibleTo<S, Y>()), int>::type=0>
    constexpr operator std::pair<X, Y>() const;
};

@{


Variable ranges::v3::make_iterator_range

constexpr auto& make_iterator_range = static_const<make_iterator_range_fn>::value;

make_iterator_range_fn


Function template ranges::v3::get<N, I, S, _concept_requires_194>

template <std::size_t N, typename I, typename S, int _concept_requires_194 = 42, typename std::enable_if<(_concept_requires_194==43)||(N<2), int>::type=0>
constexpr decltype(ranges::get<N>(static_cast<iterator_range<I, S>const&>(p))) get(sized_iterator_range<I, S>const& p);

Tuple-like access for sized_iterator_range