Header file range/v3/view/map.hpp

#include <meta/meta.hpp>

#include <range/v3/range_fwd.hpp>

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

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

#include <range/v3/view/view.hpp>

#include <range/v3/view/transform.hpp>

namespace ranges
{
    inline namespace v3
    {
        namespace detail
        {
            struct get_first
            {
                template <typename Pair>
                decltype((std::forward<Pair>(p).first)) operator()(Pair&& p) const;
            };
            
            struct get_second
            {
                template <typename Pair>
                decltype((std::forward<Pair>(p).second)) operator()(Pair&& p) const;
            };
            
            template <typename T>
            using PairLike = meta::and_<Function<get_first, T>, Function<get_second, T>>;
        }
        
        namespace view
        {
            struct keys_fn
            {
                template <typename Rng>
                using Concept = meta::and_<InputRange<Rng>, detail::PairLike<range_value_t<Rng>>>;
                
                template <typename Rng, int _concept_requires_69 = 42, typename std::enable_if<(_concept_requires_69==43)||(Concept<Rng>()), int>::type=0>
                keys_range_view<all_t<Rng>> operator()(Rng&& rng) const;
                
                template <typename Rng, int _concept_requires_76 = 42, typename std::enable_if<(_concept_requires_76==43)||(!Concept<Rng>()), int>::type=0>
                void operator()(Rng&&) const;
            };
            
            struct values_fn
            {
                template <typename Rng>
                using Concept = meta::and_<InputRange<Rng>, detail::PairLike<range_value_t<Rng>>>;
                
                template <typename Rng, int _concept_requires_96 = 42, typename std::enable_if<(_concept_requires_96==43)||(Concept<Rng>()), int>::type=0>
                values_view<all_t<Rng>> operator()(Rng&& rng) const;
                
                template <typename Rng, int _concept_requires_103 = 42, typename std::enable_if<(_concept_requires_103==43)||(!Concept<Rng>()), int>::type=0>
                void operator()(Rng&&) const;
            };
            
            inline namespace 
            {
                constexpr auto& keys = static_const<view<keys_fn>>::value;
            }
            
            inline namespace 
            {
                constexpr auto& values = static_const<view<values_fn>>::value;
            }
        }
    }
}