X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fboost%2Flibs%2Fcontainer%2Ftest%2Fmap_test.cpp;h=516d64a539dccd6423bb71739ae00364ce7b3e3c;hb=b32b81446b3b05102be0267e79203f59329c1d97;hp=ae7abf0506527fb5e1ae9f9d7ac9a3e62038d372;hpb=215dd7151453fae88e6f968c975b6ce309d42dcf;p=ceph.git diff --git a/ceph/src/boost/libs/container/test/map_test.cpp b/ceph/src/boost/libs/container/test/map_test.cpp index ae7abf050..516d64a53 100644 --- a/ceph/src/boost/libs/container/test/map_test.cpp +++ b/ceph/src/boost/libs/container/test/map_test.cpp @@ -38,13 +38,6 @@ template class map , test::simple_allocator< pair_t > >; -template class map - < test::movable_and_copyable_int - , test::movable_and_copyable_int - , std::less - , std::allocator< pair_t > - >; - template class map < test::movable_and_copyable_int , test::movable_and_copyable_int @@ -58,36 +51,6 @@ template class multimap , std::less , std::allocator< pair_t > >; - -namespace container_detail { - -//Instantiate base class as previous instantiations don't instantiate inherited members -template class tree - < pair_t - , select1st - , std::less - , test::simple_allocator - , tree_assoc_defaults - >; - -template class tree - < pair_t - , select1st - , std::less - , std::allocator - , tree_assoc_defaults - >; - -template class tree - < pair_t - , select1st - , std::less - , adaptive_pool - , tree_assoc_defaults - >; - -} //container_detail { - }} //boost::container class recursive_map @@ -282,12 +245,10 @@ int test_map_variants() { typedef typename GetAllocatorMap::template apply::map_type MyMap; typedef typename GetAllocatorMap::template apply::map_type MyMoveMap; - typedef typename GetAllocatorMap::template apply::map_type MyCopyMoveMap; typedef typename GetAllocatorMap::template apply::map_type MyCopyMap; typedef typename GetAllocatorMap::template apply::multimap_type MyMultiMap; typedef typename GetAllocatorMap::template apply::multimap_type MyMoveMultiMap; - typedef typename GetAllocatorMap::template apply::multimap_type MyCopyMoveMultiMap; typedef typename GetAllocatorMap::template apply::multimap_type MyCopyMultiMap; typedef std::map MyStdMap; @@ -311,15 +272,6 @@ int test_map_variants() return 1; } - if (0 != test::map_test< - MyCopyMoveMap - ,MyStdMap - ,MyCopyMoveMultiMap - ,MyStdMultiMap>()){ - std::cout << "Error in map_test" << std::endl; - return 1; - } - if (0 != test::map_test< MyCopyMap ,MyStdMap @@ -391,10 +343,10 @@ int main () //Test std::pair value type as tree has workarounds to make old std::pair //implementations movable that can break things { - boost::container::map s; - std::pair p; - s.insert(p); - s.emplace(p); + boost::container::map s; + std::pair p; + s.insert(p); + s.emplace(p); } //////////////////////////////////// @@ -480,6 +432,9 @@ int main () if(!node_type_test()) return 1; + if (!boost::container::test::instantiate_constructors, multimap >()) + return 1; + test::test_merge_from_different_comparison(); //////////////////////////////////// @@ -488,31 +443,21 @@ int main () // // map // - typedef map< int*, int*, std::less, std::allocator< std::pair > + typedef map< int*, int*, std::less, std::allocator< std::pair > , tree_assoc_options< optimize_size, tree_type >::type > rbmap_size_optimized_no; - typedef map< int*, int*, std::less, std::allocator< std::pair > - , tree_assoc_options< optimize_size, tree_type >::type > rbmap_size_optimized_yes; - BOOST_STATIC_ASSERT(sizeof(rbmap_size_optimized_yes) < sizeof(rbmap_size_optimized_no)); - typedef map< int*, int*, std::less, std::allocator< std::pair > - , tree_assoc_options< optimize_size, tree_type >::type > avlmap_size_optimized_no; - typedef map< int*, int*, std::less, std::allocator< std::pair > + typedef map< int*, int*, std::less, std::allocator< std::pair > , tree_assoc_options< optimize_size, tree_type >::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, std::allocator< std::pair > - , tree_assoc_options< optimize_size, tree_type >::type > rbmmap_size_optimized_no; - typedef multimap< int*, int*, std::less, std::allocator< std::pair > + typedef multimap< int*, int*, std::less, std::allocator< std::pair > , tree_assoc_options< optimize_size, tree_type >::type > rbmmap_size_optimized_yes; - BOOST_STATIC_ASSERT(sizeof(rbmmap_size_optimized_yes) < sizeof(rbmmap_size_optimized_no)); - - typedef multimap< int*, int*, std::less, std::allocator< std::pair > + typedef multimap< int*, int*, std::less, std::allocator< std::pair > , tree_assoc_options< optimize_size, tree_type >::type > avlmmap_size_optimized_no; - typedef multimap< int*, int*, std::less, std::allocator< std::pair > - , tree_assoc_options< optimize_size, tree_type >::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; }