11// ////////////////////////////////////////////////////////////////////////////
22//
3- // (C) Copyright Ion Gaztanaga 2004-2012 . Distributed under the Boost
3+ // (C) Copyright Ion Gaztanaga 2004-2026 . Distributed under the Boost
44// Software License, Version 1.0. (See accompanying file
55// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
66//
1111#include < set>
1212#include < boost/interprocess/managed_shared_memory.hpp>
1313#include < boost/container/flat_set.hpp>
14- #include < boost/container/flat_map.hpp>
1514#include < boost/interprocess/allocators/allocator.hpp>
16- #include < boost/interprocess/indexes/flat_map_index.hpp>
1715#include " print_container.hpp"
18- #include " dummy_test_allocator.hpp"
1916#include " movable_int.hpp"
2017#include " set_test.hpp"
21- #include " map_test.hpp"
2218#include " emplace_test.hpp"
2319
2420// ///////////////////////////////////////////////////////////////
@@ -44,41 +40,24 @@ typedef allocator<int, my_managed_shared_memory::segment_manager>
4440 shmem_allocator_t ;
4541typedef allocator<test::movable_int, my_managed_shared_memory::segment_manager>
4642 shmem_movable_allocator_t ;
47- typedef allocator<std::pair<int , int >, my_managed_shared_memory::segment_manager>
48- shmem_pair_allocator_t ;
49- typedef allocator<std::pair<test::movable_int, test::movable_int>, my_managed_shared_memory::segment_manager>
50- shmem_movable_pair_allocator_t ;
5143
5244typedef allocator<test::movable_and_copyable_int, my_managed_shared_memory::segment_manager>
5345 shmem_move_copy_allocator_t ;
5446
5547typedef allocator<test::copyable_int, my_managed_shared_memory::segment_manager>
5648 shmem_copy_allocator_t ;
5749
58- typedef allocator<std::pair<test::movable_and_copyable_int, test::movable_and_copyable_int>, my_managed_shared_memory::segment_manager>
59- shmem_move_copy_pair_allocator_t ;
60-
6150// Alias set types
6251typedef std::set<int > MyStdSet;
6352typedef std::multiset<int > MyStdMultiSet;
64- typedef std::map<int , int > MyStdMap;
65- typedef std::multimap<int , int > MyStdMultiMap;
6653
6754typedef boost::container::flat_set<int , std::less<int >, shmem_allocator_t > MyShmSet;
6855typedef boost::container::flat_multiset<int , std::less<int >, shmem_allocator_t > MyShmMultiSet;
69- typedef boost::container::flat_map<int , int , std::less<int >, shmem_pair_allocator_t > MyShmMap;
70- typedef boost::container::flat_multimap<int , int , std::less<int >, shmem_pair_allocator_t > MyShmMultiMap;
7156
7257typedef boost::container::flat_set<test::movable_int, std::less<test::movable_int>
7358 ,shmem_movable_allocator_t > MyMovableShmSet;
7459typedef boost::container::flat_multiset<test::movable_int,std::less<test::movable_int>
7560 ,shmem_movable_allocator_t > MyMovableShmMultiSet;
76- typedef boost::container::flat_map<test::movable_int, test::movable_int
77- ,std::less<test::movable_int>
78- ,shmem_movable_pair_allocator_t > MyMovableShmMap;
79- typedef boost::container::flat_multimap<test::movable_int, test::movable_int
80- ,std::less<test::movable_int>
81- ,shmem_movable_pair_allocator_t > MyMovableShmMultiMap;
8261
8362typedef boost::container::flat_set<test::movable_and_copyable_int, std::less<test::movable_and_copyable_int>
8463 ,shmem_move_copy_allocator_t > MyMoveCopyShmSet;
@@ -90,13 +69,6 @@ typedef boost::container::flat_set<test::copyable_int, std::less<test::copyable_
9069typedef boost::container::flat_multiset<test::copyable_int,std::less<test::copyable_int>
9170 ,shmem_copy_allocator_t > MyCopyShmMultiSet;
9271
93- typedef boost::container::flat_map<test::movable_and_copyable_int, test::movable_and_copyable_int
94- ,std::less<test::movable_and_copyable_int>
95- ,shmem_move_copy_pair_allocator_t > MyMoveCopyShmMap;
96- typedef boost::container::flat_multimap<test::movable_and_copyable_int, test::movable_and_copyable_int
97- ,std::less<test::movable_and_copyable_int>
98- ,shmem_move_copy_pair_allocator_t > MyMoveCopyShmMultiMap;
99-
10072int main ()
10173{
10274 using namespace boost ::interprocess::test;
@@ -146,49 +118,9 @@ int main()
146118 return 1 ;
147119 }
148120
149- if (0 != map_test<my_managed_shared_memory
150- ,MyShmMap
151- ,MyStdMap
152- ,MyShmMultiMap
153- ,MyStdMultiMap>()){
154- std::cout << " Error in map_test<MyShmMap>" << std::endl;
155- return 1 ;
156- }
157-
158- if (0 != map_test_copyable<my_managed_shared_memory
159- ,MyShmMap
160- ,MyStdMap
161- ,MyShmMultiMap
162- ,MyStdMultiMap>()){
163- std::cout << " Error in map_test<MyShmMap>" << std::endl;
164- return 1 ;
165- }
166-
167- // if (0 != map_test<my_managed_shared_memory
168- // ,MyMovableShmMap
169- // ,MyStdMap
170- // ,MyMovableShmMultiMap
171- // ,MyStdMultiMap>()){
172- // return 1;
173- // }
174-
175- if (0 != map_test<my_managed_shared_memory
176- ,MyMoveCopyShmMap
177- ,MyStdMap
178- ,MyMoveCopyShmMultiMap
179- ,MyStdMultiMap>()){
180- std::cout << " Error in map_test<MyMoveCopyShmMap>" << std::endl;
181- return 1 ;
182- }
183-
184121 // #if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC_MINOR__ < 3)
185122 const test::EmplaceOptions SetOptions = (test::EmplaceOptions)(test::EMPLACE_HINT | test::EMPLACE_ASSOC);
186- const test::EmplaceOptions MapOptions = (test::EmplaceOptions)(test::EMPLACE_HINT_PAIR | test::EMPLACE_ASSOC_PAIR);
187123
188- if (!boost::interprocess::test::test_emplace<boost::container::flat_map<test::EmplaceInt, test::EmplaceInt>, MapOptions>())
189- return 1 ;
190- if (!boost::interprocess::test::test_emplace<boost::container::flat_multimap<test::EmplaceInt, test::EmplaceInt>, MapOptions>())
191- return 1 ;
192124 if (!boost::interprocess::test::test_emplace<boost::container::flat_set<test::EmplaceInt>, SetOptions>())
193125 return 1 ;
194126 if (!boost::interprocess::test::test_emplace<boost::container::flat_multiset<test::EmplaceInt>, SetOptions>())
0 commit comments