Header file range/v3/action/erase.hpp

#include <range/v3/range_fwd.hpp>

#include <range/v3/action/insert.hpp>

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

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

namespace ranges
{
    inline namespace v3
    {
        namespace adl_erase_detail
        {
            template <typename Cont, typename I, int _concept_requires_31 = 42, typename std::enable_if<(_concept_requires_31==43)||(LvalueContainerLike<Cont>()&&ForwardIterator<I>()), int>::type=0>
            decltype(unwrap_reference(cont).erase(it)) erase(Cont&& cont, I it);
            
            template <typename Cont, typename I, typename S, int _concept_requires_39 = 42, typename std::enable_if<(_concept_requires_39==43)||(LvalueContainerLike<Cont>()&&ForwardIterator<I>()&&Sentinel<S, I>()), int>::type=0>
            decltype(unwrap_reference(cont).erase(begin, end)) erase(Cont&& cont, I begin, S end);
            
            struct erase_fn
            {
                template <typename Rng, typename I, int _concept_requires_51 = 42, typename std::enable_if<(_concept_requires_51==43)||(Range<Rng>()&&ForwardIterator<I>()), int>::type=0>
                decltype(erase(std::forward<Rng>(rng), it)) operator()(Rng&& rng, I it) const;
                
                template <typename Rng, typename I, typename S, int _concept_requires_58 = 42, typename std::enable_if<(_concept_requires_58==43)||(Range<Rng>()&&ForwardIterator<I>()&&Sentinel<S, I>()), int>::type=0>
                decltype(erase(std::forward<Rng>(rng), begin, end)) operator()(Rng&& rng, I begin, S end) const;
            };
        }
        
        inline namespace 
        {
            constexpr auto& erase = static_const<adl_erase_detail::erase_fn>::value;
        }
        
        namespace action
        {
            using ranges::erase;
        }
        
        namespace concepts
        {
            struct ErasableRange
            : refines<struct ranges::v3::concepts::Range (_1)>
            {
                template <typename Rng, typename ... Rest>
                using result_t = decltype(ranges::erase(val<Rng>(), val<Rest>()...));
                
                template <typename Rng, typename ... Rest>
                decltype(concepts::valid_expr(((void)ranges::erase(val<Rng>(), val<Rest>()...), 42))) requires_(Rng&&, Rest&&...);
            };
        }
        
        template <typename Rng, typename ... Rest>
        using ErasableRange = concepts::models<concepts::ErasableRange, Rng, Rest...>;
    }
}