Header file range/v3/size.hpp

#include <range/v3/range_fwd.hpp>

#include <range/v3/begin_end.hpp>

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

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

namespace ranges
{
    inline namespace v3
    {
        namespace adl_size_detail
        {
            template <typename Rng>
            constexpr decltype(iter_size(begin(rng), end(rng))) impl(Rng&& rng, ...) noexcept(noexcept(decltype(iter_size(begin(rng), end(rng)))(iter_size(begin(rng), end(rng)))));
            
            template <typename Rng, typename Result = detail::decay_t<decltype(size(std::declval<Rng&>()))>, int _concept_requires_37 = 42, typename std::enable_if<(_concept_requires_37==43)||(Integral<Result>()), int>::type=0>
            constexpr Result impl(Rng&& rng, long) noexcept(noexcept(size(rng)));
            
            template <typename Rng, typename Result = detail::decay_t<decltype(std::declval<Rng&>().size())>, int _concept_requires_45 = 42, typename std::enable_if<(_concept_requires_45==43)||(Integral<Result>()), int>::type=0>
            constexpr Result impl(Rng&& rng, int) noexcept(noexcept(rng.size()));
            
            struct size_fn
            : ranges::v3::iter_size_fn
            {
                using iter_size_fn::operator();
                
                template <typename T, std::size_t N>
                constexpr std::size_t operator()(T(&)[N]) const noexcept;
                
                template <typename T, std::size_t N>
                constexpr std::size_t operator()(T const(&)[N]) const noexcept;
                
                template <typename T, std::size_t N>
                constexpr std::size_t operator()(T(&&)[N]) const noexcept;
                
                template <typename T>
                constexpr decltype(std::declval<const size_fn&>()(t.get())) operator()(std::reference_wrapper<T> t) const noexcept(noexcept(std::declval<const size_fn&>()(t.get())));
                
                template <typename T, bool RValue>
                constexpr decltype(std::declval<const size_fn&>()(t.get())) operator()(ranges::reference_wrapper<T, RValue> t) const noexcept(noexcept(std::declval<const size_fn&>()(t.get())));
                
                template <typename Rng>
                constexpr decltype(adl_size_detail::impl(detail::forward<Rng>(rng), 42)) operator()(Rng&& rng) const noexcept(noexcept(decltype(adl_size_detail::impl(detail::forward<Rng>(rng), 42))(adl_size_detail::impl(detail::forward<Rng>(rng), 42))));
            };
        }
        
        inline namespace 
        {
            constexpr auto& size = static_const<adl_size_detail::size_fn>::value;
        }
    }
}

Variable ranges::v3::size

constexpr auto& size = static_const<adl_size_detail::size_fn>::value;

size