Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 14 additions & 18 deletions libcxx/include/__flat_map/flat_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -1125,8 +1125,7 @@ class flat_map {
};

template <class _KeyContainer, class _MappedContainer, class _Compare = less<typename _KeyContainer::value_type>>
requires(!__is_allocator<_Compare>::value && !__is_allocator<_KeyContainer>::value &&
!__is_allocator<_MappedContainer>::value &&
requires(!__is_allocator_v<_Compare> && !__is_allocator_v<_KeyContainer> && !__is_allocator_v<_MappedContainer> &&
is_invocable_v<const _Compare&,
const typename _KeyContainer::value_type&,
const typename _KeyContainer::value_type&>)
Expand All @@ -1139,7 +1138,7 @@ flat_map(_KeyContainer, _MappedContainer, _Compare = _Compare())

template <class _KeyContainer, class _MappedContainer, class _Allocator>
requires(uses_allocator_v<_KeyContainer, _Allocator> && uses_allocator_v<_MappedContainer, _Allocator> &&
!__is_allocator<_KeyContainer>::value && !__is_allocator<_MappedContainer>::value)
!__is_allocator_v<_KeyContainer> && !__is_allocator_v<_MappedContainer>)
flat_map(_KeyContainer, _MappedContainer, _Allocator)
-> flat_map<typename _KeyContainer::value_type,
typename _MappedContainer::value_type,
Expand All @@ -1148,9 +1147,8 @@ flat_map(_KeyContainer, _MappedContainer, _Allocator)
_MappedContainer>;

template <class _KeyContainer, class _MappedContainer, class _Compare, class _Allocator>
requires(!__is_allocator<_Compare>::value && !__is_allocator<_KeyContainer>::value &&
!__is_allocator<_MappedContainer>::value && uses_allocator_v<_KeyContainer, _Allocator> &&
uses_allocator_v<_MappedContainer, _Allocator> &&
requires(!__is_allocator_v<_Compare> && !__is_allocator_v<_KeyContainer> && !__is_allocator_v<_MappedContainer> &&
uses_allocator_v<_KeyContainer, _Allocator> && uses_allocator_v<_MappedContainer, _Allocator> &&
is_invocable_v<const _Compare&,
const typename _KeyContainer::value_type&,
const typename _KeyContainer::value_type&>)
Expand All @@ -1162,8 +1160,7 @@ flat_map(_KeyContainer, _MappedContainer, _Compare, _Allocator)
_MappedContainer>;

template <class _KeyContainer, class _MappedContainer, class _Compare = less<typename _KeyContainer::value_type>>
requires(!__is_allocator<_Compare>::value && !__is_allocator<_KeyContainer>::value &&
!__is_allocator<_MappedContainer>::value &&
requires(!__is_allocator_v<_Compare> && !__is_allocator_v<_KeyContainer> && !__is_allocator_v<_MappedContainer> &&
is_invocable_v<const _Compare&,
const typename _KeyContainer::value_type&,
const typename _KeyContainer::value_type&>)
Expand All @@ -1176,7 +1173,7 @@ flat_map(sorted_unique_t, _KeyContainer, _MappedContainer, _Compare = _Compare()

template <class _KeyContainer, class _MappedContainer, class _Allocator>
requires(uses_allocator_v<_KeyContainer, _Allocator> && uses_allocator_v<_MappedContainer, _Allocator> &&
!__is_allocator<_KeyContainer>::value && !__is_allocator<_MappedContainer>::value)
!__is_allocator_v<_KeyContainer> && !__is_allocator_v<_MappedContainer>)
flat_map(sorted_unique_t, _KeyContainer, _MappedContainer, _Allocator)
-> flat_map<typename _KeyContainer::value_type,
typename _MappedContainer::value_type,
Expand All @@ -1185,9 +1182,8 @@ flat_map(sorted_unique_t, _KeyContainer, _MappedContainer, _Allocator)
_MappedContainer>;

template <class _KeyContainer, class _MappedContainer, class _Compare, class _Allocator>
requires(!__is_allocator<_Compare>::value && !__is_allocator<_KeyContainer>::value &&
!__is_allocator<_MappedContainer>::value && uses_allocator_v<_KeyContainer, _Allocator> &&
uses_allocator_v<_MappedContainer, _Allocator> &&
requires(!__is_allocator_v<_Compare> && !__is_allocator_v<_KeyContainer> && !__is_allocator_v<_MappedContainer> &&
uses_allocator_v<_KeyContainer, _Allocator> && uses_allocator_v<_MappedContainer, _Allocator> &&
is_invocable_v<const _Compare&,
const typename _KeyContainer::value_type&,
const typename _KeyContainer::value_type&>)
Expand All @@ -1199,27 +1195,27 @@ flat_map(sorted_unique_t, _KeyContainer, _MappedContainer, _Compare, _Allocator)
_MappedContainer>;

template <class _InputIterator, class _Compare = less<__iter_key_type<_InputIterator>>>
requires(__has_input_iterator_category<_InputIterator>::value && !__is_allocator<_Compare>::value)
requires(__has_input_iterator_category<_InputIterator>::value && !__is_allocator_v<_Compare>)
flat_map(_InputIterator, _InputIterator, _Compare = _Compare())
-> flat_map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Compare>;

template <class _InputIterator, class _Compare = less<__iter_key_type<_InputIterator>>>
requires(__has_input_iterator_category<_InputIterator>::value && !__is_allocator<_Compare>::value)
requires(__has_input_iterator_category<_InputIterator>::value && !__is_allocator_v<_Compare>)
flat_map(sorted_unique_t, _InputIterator, _InputIterator, _Compare = _Compare())
-> flat_map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Compare>;

template <ranges::input_range _Range,
class _Compare = less<__range_key_type<_Range>>,
class _Allocator = allocator<byte>,
class = __enable_if_t<!__is_allocator<_Compare>::value && __is_allocator<_Allocator>::value>>
class = __enable_if_t<!__is_allocator_v<_Compare> && __is_allocator_v<_Allocator>>>
flat_map(from_range_t, _Range&&, _Compare = _Compare(), _Allocator = _Allocator()) -> flat_map<
__range_key_type<_Range>,
__range_mapped_type<_Range>,
_Compare,
vector<__range_key_type<_Range>, __allocator_traits_rebind_t<_Allocator, __range_key_type<_Range>>>,
vector<__range_mapped_type<_Range>, __allocator_traits_rebind_t<_Allocator, __range_mapped_type<_Range>>>>;

template <ranges::input_range _Range, class _Allocator, class = __enable_if_t<__is_allocator<_Allocator>::value>>
template <ranges::input_range _Range, class _Allocator, class = __enable_if_t<__is_allocator_v<_Allocator>>>
flat_map(from_range_t, _Range&&, _Allocator) -> flat_map<
__range_key_type<_Range>,
__range_mapped_type<_Range>,
Expand All @@ -1228,11 +1224,11 @@ flat_map(from_range_t, _Range&&, _Allocator) -> flat_map<
vector<__range_mapped_type<_Range>, __allocator_traits_rebind_t<_Allocator, __range_mapped_type<_Range>>>>;

template <class _Key, class _Tp, class _Compare = less<_Key>>
requires(!__is_allocator<_Compare>::value)
requires(!__is_allocator_v<_Compare>)
flat_map(initializer_list<pair<_Key, _Tp>>, _Compare = _Compare()) -> flat_map<_Key, _Tp, _Compare>;

template <class _Key, class _Tp, class _Compare = less<_Key>>
requires(!__is_allocator<_Compare>::value)
requires(!__is_allocator_v<_Compare>)
flat_map(sorted_unique_t, initializer_list<pair<_Key, _Tp>>, _Compare = _Compare()) -> flat_map<_Key, _Tp, _Compare>;

template <class _Key, class _Tp, class _Compare, class _KeyContainer, class _MappedContainer, class _Allocator>
Expand Down
32 changes: 14 additions & 18 deletions libcxx/include/__flat_map/flat_multimap.h
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,7 @@ class flat_multimap {
};

template <class _KeyContainer, class _MappedContainer, class _Compare = less<typename _KeyContainer::value_type>>
requires(!__is_allocator<_Compare>::value && !__is_allocator<_KeyContainer>::value &&
!__is_allocator<_MappedContainer>::value &&
requires(!__is_allocator_v<_Compare> && !__is_allocator_v<_KeyContainer> && !__is_allocator_v<_MappedContainer> &&
is_invocable_v<const _Compare&,
const typename _KeyContainer::value_type&,
const typename _KeyContainer::value_type&>)
Expand All @@ -942,7 +941,7 @@ flat_multimap(_KeyContainer, _MappedContainer, _Compare = _Compare())

template <class _KeyContainer, class _MappedContainer, class _Allocator>
requires(uses_allocator_v<_KeyContainer, _Allocator> && uses_allocator_v<_MappedContainer, _Allocator> &&
!__is_allocator<_KeyContainer>::value && !__is_allocator<_MappedContainer>::value)
!__is_allocator_v<_KeyContainer> && !__is_allocator_v<_MappedContainer>)
flat_multimap(_KeyContainer, _MappedContainer, _Allocator)
-> flat_multimap<typename _KeyContainer::value_type,
typename _MappedContainer::value_type,
Expand All @@ -951,9 +950,8 @@ flat_multimap(_KeyContainer, _MappedContainer, _Allocator)
_MappedContainer>;

template <class _KeyContainer, class _MappedContainer, class _Compare, class _Allocator>
requires(!__is_allocator<_Compare>::value && !__is_allocator<_KeyContainer>::value &&
!__is_allocator<_MappedContainer>::value && uses_allocator_v<_KeyContainer, _Allocator> &&
uses_allocator_v<_MappedContainer, _Allocator> &&
requires(!__is_allocator_v<_Compare> && !__is_allocator_v<_KeyContainer> && !__is_allocator_v<_MappedContainer> &&
uses_allocator_v<_KeyContainer, _Allocator> && uses_allocator_v<_MappedContainer, _Allocator> &&
is_invocable_v<const _Compare&,
const typename _KeyContainer::value_type&,
const typename _KeyContainer::value_type&>)
Expand All @@ -965,8 +963,7 @@ flat_multimap(_KeyContainer, _MappedContainer, _Compare, _Allocator)
_MappedContainer>;

template <class _KeyContainer, class _MappedContainer, class _Compare = less<typename _KeyContainer::value_type>>
requires(!__is_allocator<_Compare>::value && !__is_allocator<_KeyContainer>::value &&
!__is_allocator<_MappedContainer>::value &&
requires(!__is_allocator_v<_Compare> && !__is_allocator_v<_KeyContainer> && !__is_allocator_v<_MappedContainer> &&
is_invocable_v<const _Compare&,
const typename _KeyContainer::value_type&,
const typename _KeyContainer::value_type&>)
Expand All @@ -979,7 +976,7 @@ flat_multimap(sorted_equivalent_t, _KeyContainer, _MappedContainer, _Compare = _

template <class _KeyContainer, class _MappedContainer, class _Allocator>
requires(uses_allocator_v<_KeyContainer, _Allocator> && uses_allocator_v<_MappedContainer, _Allocator> &&
!__is_allocator<_KeyContainer>::value && !__is_allocator<_MappedContainer>::value)
!__is_allocator_v<_KeyContainer> && !__is_allocator_v<_MappedContainer>)
flat_multimap(sorted_equivalent_t, _KeyContainer, _MappedContainer, _Allocator)
-> flat_multimap<typename _KeyContainer::value_type,
typename _MappedContainer::value_type,
Expand All @@ -988,9 +985,8 @@ flat_multimap(sorted_equivalent_t, _KeyContainer, _MappedContainer, _Allocator)
_MappedContainer>;

template <class _KeyContainer, class _MappedContainer, class _Compare, class _Allocator>
requires(!__is_allocator<_Compare>::value && !__is_allocator<_KeyContainer>::value &&
!__is_allocator<_MappedContainer>::value && uses_allocator_v<_KeyContainer, _Allocator> &&
uses_allocator_v<_MappedContainer, _Allocator> &&
requires(!__is_allocator_v<_Compare> && !__is_allocator_v<_KeyContainer> && !__is_allocator_v<_MappedContainer> &&
uses_allocator_v<_KeyContainer, _Allocator> && uses_allocator_v<_MappedContainer, _Allocator> &&
is_invocable_v<const _Compare&,
const typename _KeyContainer::value_type&,
const typename _KeyContainer::value_type&>)
Expand All @@ -1002,27 +998,27 @@ flat_multimap(sorted_equivalent_t, _KeyContainer, _MappedContainer, _Compare, _A
_MappedContainer>;

template <class _InputIterator, class _Compare = less<__iter_key_type<_InputIterator>>>
requires(__has_input_iterator_category<_InputIterator>::value && !__is_allocator<_Compare>::value)
requires(__has_input_iterator_category<_InputIterator>::value && !__is_allocator_v<_Compare>)
flat_multimap(_InputIterator, _InputIterator, _Compare = _Compare())
-> flat_multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Compare>;

template <class _InputIterator, class _Compare = less<__iter_key_type<_InputIterator>>>
requires(__has_input_iterator_category<_InputIterator>::value && !__is_allocator<_Compare>::value)
requires(__has_input_iterator_category<_InputIterator>::value && !__is_allocator_v<_Compare>)
flat_multimap(sorted_equivalent_t, _InputIterator, _InputIterator, _Compare = _Compare())
-> flat_multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Compare>;

template <ranges::input_range _Range,
class _Compare = less<__range_key_type<_Range>>,
class _Allocator = allocator<byte>,
class = __enable_if_t<!__is_allocator<_Compare>::value && __is_allocator<_Allocator>::value>>
class = __enable_if_t<!__is_allocator_v<_Compare> && __is_allocator_v<_Allocator>>>
flat_multimap(from_range_t, _Range&&, _Compare = _Compare(), _Allocator = _Allocator()) -> flat_multimap<
__range_key_type<_Range>,
__range_mapped_type<_Range>,
_Compare,
vector<__range_key_type<_Range>, __allocator_traits_rebind_t<_Allocator, __range_key_type<_Range>>>,
vector<__range_mapped_type<_Range>, __allocator_traits_rebind_t<_Allocator, __range_mapped_type<_Range>>>>;

template <ranges::input_range _Range, class _Allocator, class = __enable_if_t<__is_allocator<_Allocator>::value>>
template <ranges::input_range _Range, class _Allocator, class = __enable_if_t<__is_allocator_v<_Allocator>>>
flat_multimap(from_range_t, _Range&&, _Allocator) -> flat_multimap<
__range_key_type<_Range>,
__range_mapped_type<_Range>,
Expand All @@ -1031,11 +1027,11 @@ flat_multimap(from_range_t, _Range&&, _Allocator) -> flat_multimap<
vector<__range_mapped_type<_Range>, __allocator_traits_rebind_t<_Allocator, __range_mapped_type<_Range>>>>;

template <class _Key, class _Tp, class _Compare = less<_Key>>
requires(!__is_allocator<_Compare>::value)
requires(!__is_allocator_v<_Compare>)
flat_multimap(initializer_list<pair<_Key, _Tp>>, _Compare = _Compare()) -> flat_multimap<_Key, _Tp, _Compare>;

template <class _Key, class _Tp, class _Compare = less<_Key>>
requires(!__is_allocator<_Compare>::value)
requires(!__is_allocator_v<_Compare>)
flat_multimap(sorted_equivalent_t, initializer_list<pair<_Key, _Tp>>, _Compare = _Compare())
-> flat_multimap<_Key, _Tp, _Compare>;

Expand Down
Loading
Loading