forked from boostorg/container
Split set/map tests as some compilers refuse to allocate too many sectios in the object file
This commit is contained in:
+3
-54
@@ -51,36 +51,6 @@ template class multimap
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, std::allocator< pair_t >
|
||||
>;
|
||||
|
||||
namespace container_detail {
|
||||
|
||||
//Instantiate base class as previous instantiations don't instantiate inherited members
|
||||
template class tree
|
||||
< pair_t
|
||||
, select1st<test::movable_and_copyable_int>
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, test::simple_allocator<pair_t>
|
||||
, tree_assoc_defaults
|
||||
>;
|
||||
|
||||
template class tree
|
||||
< pair_t
|
||||
, select1st<test::movable_and_copyable_int>
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, std::allocator<pair_t>
|
||||
, tree_assoc_defaults
|
||||
>;
|
||||
|
||||
template class tree
|
||||
< pair_t
|
||||
, select1st<test::movable_and_copyable_int>
|
||||
, std::less<test::movable_and_copyable_int>
|
||||
, adaptive_pool<pair_t>
|
||||
, tree_assoc_defaults
|
||||
>;
|
||||
|
||||
} //container_detail {
|
||||
|
||||
}} //boost::container
|
||||
|
||||
class recursive_map
|
||||
@@ -275,12 +245,10 @@ int test_map_variants()
|
||||
{
|
||||
typedef typename GetAllocatorMap<VoidAllocator, tree_type_value>::template apply<int>::map_type MyMap;
|
||||
typedef typename GetAllocatorMap<VoidAllocator, tree_type_value>::template apply<test::movable_int>::map_type MyMoveMap;
|
||||
typedef typename GetAllocatorMap<VoidAllocator, tree_type_value>::template apply<test::movable_and_copyable_int>::map_type MyCopyMoveMap;
|
||||
typedef typename GetAllocatorMap<VoidAllocator, tree_type_value>::template apply<test::copyable_int>::map_type MyCopyMap;
|
||||
|
||||
typedef typename GetAllocatorMap<VoidAllocator, tree_type_value>::template apply<int>::multimap_type MyMultiMap;
|
||||
typedef typename GetAllocatorMap<VoidAllocator, tree_type_value>::template apply<test::movable_int>::multimap_type MyMoveMultiMap;
|
||||
typedef typename GetAllocatorMap<VoidAllocator, tree_type_value>::template apply<test::movable_and_copyable_int>::multimap_type MyCopyMoveMultiMap;
|
||||
typedef typename GetAllocatorMap<VoidAllocator, tree_type_value>::template apply<test::copyable_int>::multimap_type MyCopyMultiMap;
|
||||
|
||||
typedef std::map<int, int> MyStdMap;
|
||||
@@ -304,15 +272,6 @@ int test_map_variants()
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (0 != test::map_test<
|
||||
MyCopyMoveMap
|
||||
,MyStdMap
|
||||
,MyCopyMoveMultiMap
|
||||
,MyStdMultiMap>()){
|
||||
std::cout << "Error in map_test<MyBoostMap>" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (0 != test::map_test<
|
||||
MyCopyMap
|
||||
,MyStdMap
|
||||
@@ -483,29 +442,19 @@ int main ()
|
||||
//
|
||||
typedef map< int*, int*, std::less<int*>, std::allocator< std::pair<int const*, int*> >
|
||||
, tree_assoc_options< optimize_size<false>, tree_type<red_black_tree> >::type > rbmap_size_optimized_no;
|
||||
typedef map< int*, int*, std::less<int*>, std::allocator< std::pair<int const*, int*> >
|
||||
, tree_assoc_options< optimize_size<true>, tree_type<red_black_tree> >::type > rbmap_size_optimized_yes;
|
||||
BOOST_STATIC_ASSERT(sizeof(rbmap_size_optimized_yes) < sizeof(rbmap_size_optimized_no));
|
||||
|
||||
typedef map< int*, int*, std::less<int*>, std::allocator< std::pair<int const*, int*> >
|
||||
, tree_assoc_options< optimize_size<false>, tree_type<avl_tree> >::type > avlmap_size_optimized_no;
|
||||
typedef map< int*, int*, std::less<int*>, std::allocator< std::pair<int const*, int*> >
|
||||
, tree_assoc_options< optimize_size<true>, tree_type<avl_tree> >::type > avlmap_size_optimized_yes;
|
||||
BOOST_STATIC_ASSERT(sizeof(avlmap_size_optimized_yes) < sizeof(avlmap_size_optimized_no));
|
||||
//
|
||||
// multimap
|
||||
//
|
||||
typedef multimap< int*, int*, std::less<int*>, std::allocator< std::pair<int const*, int*> >
|
||||
, tree_assoc_options< optimize_size<false>, tree_type<red_black_tree> >::type > rbmmap_size_optimized_no;
|
||||
typedef multimap< int*, int*, std::less<int*>, std::allocator< std::pair<int const*, int*> >
|
||||
, tree_assoc_options< optimize_size<true>, tree_type<red_black_tree> >::type > rbmmap_size_optimized_yes;
|
||||
BOOST_STATIC_ASSERT(sizeof(rbmmap_size_optimized_yes) < sizeof(rbmmap_size_optimized_no));
|
||||
|
||||
typedef multimap< int*, int*, std::less<int*>, std::allocator< std::pair<int const*, int*> >
|
||||
, tree_assoc_options< optimize_size<false>, tree_type<avl_tree> >::type > avlmmap_size_optimized_no;
|
||||
typedef multimap< int*, int*, std::less<int*>, std::allocator< std::pair<int const*, int*> >
|
||||
, tree_assoc_options< optimize_size<true>, tree_type<avl_tree> >::type > avlmmap_size_optimized_yes;
|
||||
BOOST_STATIC_ASSERT(sizeof(avlmmap_size_optimized_yes) < sizeof(avlmmap_size_optimized_no));
|
||||
BOOST_STATIC_ASSERT(sizeof(rbmmap_size_optimized_yes) < sizeof(rbmap_size_optimized_no));
|
||||
BOOST_STATIC_ASSERT(sizeof(avlmap_size_optimized_yes) < sizeof(avlmmap_size_optimized_no));
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user