2 //===----------------------------------------------------------------------===//
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
10 #ifndef _LIBCPP___ITERATOR_RANGES_ITERATOR_TRAITS_H
11 #define _LIBCPP___ITERATOR_RANGES_ITERATOR_TRAITS_H
14 #include <__fwd/pair.h>
15 #include <__ranges/concepts.h>
16 #include <__type_traits/remove_const.h>
18 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
19 # pragma GCC system_header
22 _LIBCPP_BEGIN_NAMESPACE_STD
24 #if _LIBCPP_STD_VER >= 23
26 template <ranges::input_range _Range
>
27 using __range_key_type _LIBCPP_NODEBUG
= __remove_const_t
<typename
ranges::range_value_t
<_Range
>::first_type
>;
29 template <ranges::input_range _Range
>
30 using __range_mapped_type _LIBCPP_NODEBUG
= typename
ranges::range_value_t
<_Range
>::second_type
;
32 template <ranges::input_range _Range
>
33 using __range_to_alloc_type _LIBCPP_NODEBUG
=
34 pair
<const typename
ranges::range_value_t
<_Range
>::first_type
, typename
ranges::range_value_t
<_Range
>::second_type
>;
38 _LIBCPP_END_NAMESPACE_STD
40 #endif // _LIBCPP___ITERATOR_RANGES_ITERATOR_TRAITS_H