Header file range/v3/algorithm/tagspec.hpp

#include <range/v3/range_fwd.hpp>

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

namespace ranges
{
    inline namespace v3
    {
        namespace tag
        {
            struct in
            {
                template <typename Untagged, std::size_t I, typename Next>
                class getter
                : public Next
                {
                protected:
                    ~getter() = default;
                    
                public:
                    getter() = default;
                    
                    getter(getter&&) = default;
                    
                    getter(getter const&) = default;
                    
                    using Next::Next;
                    
                    template <int _concept_requires_23 = 42, typename std::enable_if<(_concept_requires_23==43)||(MoveConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged&& that) noexcept(std::is_nothrow_move_constructible<Untagged>::value);
                    
                    template <int _concept_requires_23 = 42, typename std::enable_if<(_concept_requires_23==43)||(CopyConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged const& that) noexcept(std::is_nothrow_copy_constructible<Untagged>::value);
                    
                    getter& operator=(getter&&) = default;
                    
                    getter& operator=(getter const&) = default;
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>& in() & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged&>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>&& in() && noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>const& in() const & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged const&>())));
                };
            };
        }
        
        namespace tag
        {
            struct in1
            {
                template <typename Untagged, std::size_t I, typename Next>
                class getter
                : public Next
                {
                protected:
                    ~getter() = default;
                    
                public:
                    getter() = default;
                    
                    getter(getter&&) = default;
                    
                    getter(getter const&) = default;
                    
                    using Next::Next;
                    
                    template <int _concept_requires_24 = 42, typename std::enable_if<(_concept_requires_24==43)||(MoveConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged&& that) noexcept(std::is_nothrow_move_constructible<Untagged>::value);
                    
                    template <int _concept_requires_24 = 42, typename std::enable_if<(_concept_requires_24==43)||(CopyConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged const& that) noexcept(std::is_nothrow_copy_constructible<Untagged>::value);
                    
                    getter& operator=(getter&&) = default;
                    
                    getter& operator=(getter const&) = default;
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>& in1() & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged&>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>&& in1() && noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>const& in1() const & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged const&>())));
                };
            };
        }
        
        namespace tag
        {
            struct in2
            {
                template <typename Untagged, std::size_t I, typename Next>
                class getter
                : public Next
                {
                protected:
                    ~getter() = default;
                    
                public:
                    getter() = default;
                    
                    getter(getter&&) = default;
                    
                    getter(getter const&) = default;
                    
                    using Next::Next;
                    
                    template <int _concept_requires_25 = 42, typename std::enable_if<(_concept_requires_25==43)||(MoveConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged&& that) noexcept(std::is_nothrow_move_constructible<Untagged>::value);
                    
                    template <int _concept_requires_25 = 42, typename std::enable_if<(_concept_requires_25==43)||(CopyConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged const& that) noexcept(std::is_nothrow_copy_constructible<Untagged>::value);
                    
                    getter& operator=(getter&&) = default;
                    
                    getter& operator=(getter const&) = default;
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>& in2() & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged&>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>&& in2() && noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>const& in2() const & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged const&>())));
                };
            };
        }
        
        namespace tag
        {
            struct out
            {
                template <typename Untagged, std::size_t I, typename Next>
                class getter
                : public Next
                {
                protected:
                    ~getter() = default;
                    
                public:
                    getter() = default;
                    
                    getter(getter&&) = default;
                    
                    getter(getter const&) = default;
                    
                    using Next::Next;
                    
                    template <int _concept_requires_26 = 42, typename std::enable_if<(_concept_requires_26==43)||(MoveConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged&& that) noexcept(std::is_nothrow_move_constructible<Untagged>::value);
                    
                    template <int _concept_requires_26 = 42, typename std::enable_if<(_concept_requires_26==43)||(CopyConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged const& that) noexcept(std::is_nothrow_copy_constructible<Untagged>::value);
                    
                    getter& operator=(getter&&) = default;
                    
                    getter& operator=(getter const&) = default;
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>& out() & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged&>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>&& out() && noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>const& out() const & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged const&>())));
                };
            };
        }
        
        namespace tag
        {
            struct out1
            {
                template <typename Untagged, std::size_t I, typename Next>
                class getter
                : public Next
                {
                protected:
                    ~getter() = default;
                    
                public:
                    getter() = default;
                    
                    getter(getter&&) = default;
                    
                    getter(getter const&) = default;
                    
                    using Next::Next;
                    
                    template <int _concept_requires_27 = 42, typename std::enable_if<(_concept_requires_27==43)||(MoveConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged&& that) noexcept(std::is_nothrow_move_constructible<Untagged>::value);
                    
                    template <int _concept_requires_27 = 42, typename std::enable_if<(_concept_requires_27==43)||(CopyConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged const& that) noexcept(std::is_nothrow_copy_constructible<Untagged>::value);
                    
                    getter& operator=(getter&&) = default;
                    
                    getter& operator=(getter const&) = default;
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>& out1() & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged&>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>&& out1() && noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>const& out1() const & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged const&>())));
                };
            };
        }
        
        namespace tag
        {
            struct out2
            {
                template <typename Untagged, std::size_t I, typename Next>
                class getter
                : public Next
                {
                protected:
                    ~getter() = default;
                    
                public:
                    getter() = default;
                    
                    getter(getter&&) = default;
                    
                    getter(getter const&) = default;
                    
                    using Next::Next;
                    
                    template <int _concept_requires_28 = 42, typename std::enable_if<(_concept_requires_28==43)||(MoveConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged&& that) noexcept(std::is_nothrow_move_constructible<Untagged>::value);
                    
                    template <int _concept_requires_28 = 42, typename std::enable_if<(_concept_requires_28==43)||(CopyConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged const& that) noexcept(std::is_nothrow_copy_constructible<Untagged>::value);
                    
                    getter& operator=(getter&&) = default;
                    
                    getter& operator=(getter const&) = default;
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>& out2() & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged&>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>&& out2() && noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>const& out2() const & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged const&>())));
                };
            };
        }
        
        namespace tag
        {
            struct fun
            {
                template <typename Untagged, std::size_t I, typename Next>
                class getter
                : public Next
                {
                protected:
                    ~getter() = default;
                    
                public:
                    getter() = default;
                    
                    getter(getter&&) = default;
                    
                    getter(getter const&) = default;
                    
                    using Next::Next;
                    
                    template <int _concept_requires_29 = 42, typename std::enable_if<(_concept_requires_29==43)||(MoveConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged&& that) noexcept(std::is_nothrow_move_constructible<Untagged>::value);
                    
                    template <int _concept_requires_29 = 42, typename std::enable_if<(_concept_requires_29==43)||(CopyConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged const& that) noexcept(std::is_nothrow_copy_constructible<Untagged>::value);
                    
                    getter& operator=(getter&&) = default;
                    
                    getter& operator=(getter const&) = default;
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>& fun() & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged&>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>&& fun() && noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>const& fun() const & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged const&>())));
                };
            };
        }
        
        namespace tag
        {
            struct min
            {
                template <typename Untagged, std::size_t I, typename Next>
                class getter
                : public Next
                {
                protected:
                    ~getter() = default;
                    
                public:
                    getter() = default;
                    
                    getter(getter&&) = default;
                    
                    getter(getter const&) = default;
                    
                    using Next::Next;
                    
                    template <int _concept_requires_30 = 42, typename std::enable_if<(_concept_requires_30==43)||(MoveConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged&& that) noexcept(std::is_nothrow_move_constructible<Untagged>::value);
                    
                    template <int _concept_requires_30 = 42, typename std::enable_if<(_concept_requires_30==43)||(CopyConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged const& that) noexcept(std::is_nothrow_copy_constructible<Untagged>::value);
                    
                    getter& operator=(getter&&) = default;
                    
                    getter& operator=(getter const&) = default;
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>& min() & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged&>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>&& min() && noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>const& min() const & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged const&>())));
                };
            };
        }
        
        namespace tag
        {
            struct max
            {
                template <typename Untagged, std::size_t I, typename Next>
                class getter
                : public Next
                {
                protected:
                    ~getter() = default;
                    
                public:
                    getter() = default;
                    
                    getter(getter&&) = default;
                    
                    getter(getter const&) = default;
                    
                    using Next::Next;
                    
                    template <int _concept_requires_31 = 42, typename std::enable_if<(_concept_requires_31==43)||(MoveConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged&& that) noexcept(std::is_nothrow_move_constructible<Untagged>::value);
                    
                    template <int _concept_requires_31 = 42, typename std::enable_if<(_concept_requires_31==43)||(CopyConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged const& that) noexcept(std::is_nothrow_copy_constructible<Untagged>::value);
                    
                    getter& operator=(getter&&) = default;
                    
                    getter& operator=(getter const&) = default;
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>& max() & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged&>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>&& max() && noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>const& max() const & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged const&>())));
                };
            };
        }
        
        namespace tag
        {
            struct begin
            {
                template <typename Untagged, std::size_t I, typename Next>
                class getter
                : public Next
                {
                protected:
                    ~getter() = default;
                    
                public:
                    getter() = default;
                    
                    getter(getter&&) = default;
                    
                    getter(getter const&) = default;
                    
                    using Next::Next;
                    
                    template <int _concept_requires_32 = 42, typename std::enable_if<(_concept_requires_32==43)||(MoveConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged&& that) noexcept(std::is_nothrow_move_constructible<Untagged>::value);
                    
                    template <int _concept_requires_32 = 42, typename std::enable_if<(_concept_requires_32==43)||(CopyConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged const& that) noexcept(std::is_nothrow_copy_constructible<Untagged>::value);
                    
                    getter& operator=(getter&&) = default;
                    
                    getter& operator=(getter const&) = default;
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>& begin() & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged&>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>&& begin() && noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>const& begin() const & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged const&>())));
                };
            };
        }
        
        namespace tag
        {
            struct end
            {
                template <typename Untagged, std::size_t I, typename Next>
                class getter
                : public Next
                {
                protected:
                    ~getter() = default;
                    
                public:
                    getter() = default;
                    
                    getter(getter&&) = default;
                    
                    getter(getter const&) = default;
                    
                    using Next::Next;
                    
                    template <int _concept_requires_33 = 42, typename std::enable_if<(_concept_requires_33==43)||(MoveConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged&& that) noexcept(std::is_nothrow_move_constructible<Untagged>::value);
                    
                    template <int _concept_requires_33 = 42, typename std::enable_if<(_concept_requires_33==43)||(CopyConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged const& that) noexcept(std::is_nothrow_copy_constructible<Untagged>::value);
                    
                    getter& operator=(getter&&) = default;
                    
                    getter& operator=(getter const&) = default;
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>& end() & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged&>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>&& end() && noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>const& end() const & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged const&>())));
                };
            };
        }
        
        namespace tag
        {
            struct current
            {
                template <typename Untagged, std::size_t I, typename Next>
                class getter
                : public Next
                {
                protected:
                    ~getter() = default;
                    
                public:
                    getter() = default;
                    
                    getter(getter&&) = default;
                    
                    getter(getter const&) = default;
                    
                    using Next::Next;
                    
                    template <int _concept_requires_35 = 42, typename std::enable_if<(_concept_requires_35==43)||(MoveConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged&& that) noexcept(std::is_nothrow_move_constructible<Untagged>::value);
                    
                    template <int _concept_requires_35 = 42, typename std::enable_if<(_concept_requires_35==43)||(CopyConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged const& that) noexcept(std::is_nothrow_copy_constructible<Untagged>::value);
                    
                    getter& operator=(getter&&) = default;
                    
                    getter& operator=(getter const&) = default;
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>& current() & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged&>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>&& current() && noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>const& current() const & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged const&>())));
                };
            };
        }
        
        namespace tag
        {
            struct engine
            {
                template <typename Untagged, std::size_t I, typename Next>
                class getter
                : public Next
                {
                protected:
                    ~getter() = default;
                    
                public:
                    getter() = default;
                    
                    getter(getter&&) = default;
                    
                    getter(getter const&) = default;
                    
                    using Next::Next;
                    
                    template <int _concept_requires_36 = 42, typename std::enable_if<(_concept_requires_36==43)||(MoveConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged&& that) noexcept(std::is_nothrow_move_constructible<Untagged>::value);
                    
                    template <int _concept_requires_36 = 42, typename std::enable_if<(_concept_requires_36==43)||(CopyConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged const& that) noexcept(std::is_nothrow_copy_constructible<Untagged>::value);
                    
                    getter& operator=(getter&&) = default;
                    
                    getter& operator=(getter const&) = default;
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>& engine() & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged&>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>&& engine() && noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>const& engine() const & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged const&>())));
                };
            };
        }
        
        namespace tag
        {
            struct range
            {
                template <typename Untagged, std::size_t I, typename Next>
                class getter
                : public Next
                {
                protected:
                    ~getter() = default;
                    
                public:
                    getter() = default;
                    
                    getter(getter&&) = default;
                    
                    getter(getter const&) = default;
                    
                    using Next::Next;
                    
                    template <int _concept_requires_37 = 42, typename std::enable_if<(_concept_requires_37==43)||(MoveConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged&& that) noexcept(std::is_nothrow_move_constructible<Untagged>::value);
                    
                    template <int _concept_requires_37 = 42, typename std::enable_if<(_concept_requires_37==43)||(CopyConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged const& that) noexcept(std::is_nothrow_copy_constructible<Untagged>::value);
                    
                    getter& operator=(getter&&) = default;
                    
                    getter& operator=(getter const&) = default;
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>& range() & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged&>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>&& range() && noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>const& range() const & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged const&>())));
                };
            };
        }
        
        namespace tag
        {
            struct size
            {
                template <typename Untagged, std::size_t I, typename Next>
                class getter
                : public Next
                {
                protected:
                    ~getter() = default;
                    
                public:
                    getter() = default;
                    
                    getter(getter&&) = default;
                    
                    getter(getter const&) = default;
                    
                    using Next::Next;
                    
                    template <int _concept_requires_38 = 42, typename std::enable_if<(_concept_requires_38==43)||(MoveConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged&& that) noexcept(std::is_nothrow_move_constructible<Untagged>::value);
                    
                    template <int _concept_requires_38 = 42, typename std::enable_if<(_concept_requires_38==43)||(CopyConstructible<Untagged>()), int>::type=0>
                    constexpr getter(Untagged const& that) noexcept(std::is_nothrow_copy_constructible<Untagged>::value);
                    
                    getter& operator=(getter&&) = default;
                    
                    getter& operator=(getter const&) = default;
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>& size() & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged&>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>&& size() && noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged>())));
                    
                    constexpr meta::_t<std::tuple_element<I, Untagged>>const& size() const & noexcept(noexcept(detail::adl_get<I>(std::declval<Untagged const&>())));
                };
            };
        }
    }
}