10
10
11
11
// <flat_map>
12
12
13
- // flat_multimap(sorted_unique_t , key_container_type key_cont, mapped_container_type mapped_cont,
13
+ // flat_multimap(sorted_equivalent_t , key_container_type key_cont, mapped_container_type mapped_cont,
14
14
// const key_compare& comp = key_compare());
15
15
//
16
16
// template<class Alloc>
17
- // flat_multimap(sorted_unique_t , const key_container_type& key_cont,
17
+ // flat_multimap(sorted_equivalent_t , const key_container_type& key_cont,
18
18
// const mapped_container_type& mapped_cont, const Alloc& a);
19
19
// template<class Alloc>
20
- // flat_multimap(sorted_unique_t , const key_container_type& key_cont,
20
+ // flat_multimap(sorted_equivalent_t , const key_container_type& key_cont,
21
21
// const mapped_container_type& mapped_cont,
22
22
// const key_compare& comp, const Alloc& a);
23
23
24
- #include < __flat_map/sorted_equivalent.h>
25
24
#include < algorithm>
26
25
#include < deque>
27
26
#include < flat_map>
39
38
template <template <class ...> class KeyContainer , template <class ...> class ValueContainer >
40
39
constexpr void test () {
41
40
{
42
- // flat_multimap(sorted_unique_t , key_container_type , mapped_container_type)
41
+ // flat_multimap(sorted_equivalent_t , key_container_type , mapped_container_type)
43
42
using M = std::flat_multimap<int , char , std::less<int >, KeyContainer<int >, ValueContainer<char >>;
44
43
KeyContainer<int > ks = {1 , 4 , 4 , 10 };
45
44
ValueContainer<char > vs = {4 , 3 , 2 , 1 };
@@ -58,7 +57,7 @@ constexpr void test() {
58
57
assert (m == m2);
59
58
}
60
59
{
61
- // flat_multimap(sorted_unique_t , key_container_type , mapped_container_type)
60
+ // flat_multimap(sorted_equivalent_t , key_container_type , mapped_container_type)
62
61
// non-default container, comparator and allocator type
63
62
using Ks = KeyContainer<int , min_allocator<int >>;
64
63
using Vs = ValueContainer<char , min_allocator<char >>;
@@ -73,7 +72,7 @@ constexpr void test() {
73
72
assert (std::ranges::equal (m, std::vector<std::pair<int , char >>{{10 , 1 }, {4 , 2 }, {4 , 3 }, {1 , 4 }}));
74
73
}
75
74
{
76
- // flat_multimap(sorted_unique_t , key_container_type , mapped_container_type)
75
+ // flat_multimap(sorted_equivalent_t , key_container_type , mapped_container_type)
77
76
// allocator copied into the containers
78
77
using A = test_allocator<int >;
79
78
using M = std::flat_multimap<int , int , std::less<int >, KeyContainer<int , A>, ValueContainer<int , A>>;
@@ -87,7 +86,7 @@ constexpr void test() {
87
86
assert (m.values ().get_allocator () == A (5 ));
88
87
}
89
88
{
90
- // flat_multimap(sorted_unique_t , key_container_type , mapped_container_type, key_compare)
89
+ // flat_multimap(sorted_equivalent_t , key_container_type , mapped_container_type, key_compare)
91
90
using C = test_less<int >;
92
91
using M = std::flat_multimap<int , char , C, KeyContainer<int >, ValueContainer<char >>;
93
92
KeyContainer<int > ks = {1 , 4 , 4 , 10 };
@@ -103,7 +102,7 @@ constexpr void test() {
103
102
assert (m2.key_comp () == C (4 ));
104
103
}
105
104
{
106
- // flat_multimap(sorted_unique_t , key_container_type , mapped_container_type, key_compare, const Allocator&)
105
+ // flat_multimap(sorted_equivalent_t , key_container_type , mapped_container_type, key_compare, const Allocator&)
107
106
using C = test_less<int >;
108
107
using A = test_allocator<int >;
109
108
using M = std::flat_multimap<int , int , C, KeyContainer<int , A>, ValueContainer<int , A>>;
@@ -123,7 +122,7 @@ constexpr void test() {
123
122
assert (m2.values ().get_allocator () == A (5 ));
124
123
}
125
124
{
126
- // flat_multimap(sorted_unique_t , key_container_type , mapped_container_type, const Allocator&)
125
+ // flat_multimap(sorted_equivalent_t , key_container_type , mapped_container_type, const Allocator&)
127
126
using A = test_allocator<int >;
128
127
using M = std::flat_multimap<int , int , std::less<int >, KeyContainer<int , A>, ValueContainer<int , A>>;
129
128
auto ks = KeyContainer<int , A>({1 , 4 , 4 , 10 }, A (4 ));
0 commit comments