////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2004-2019. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/container for documentation. // ////////////////////////////////////////////////////////////////////////////// #include #include #include #include #include #include #include #include "map_test.hpp" #include using namespace boost::container; template struct GetMapContainer { template struct apply { typedef std::pair type_t; typedef flat_map< ValueType , ValueType , std::less , typename boost::container::dtl::container_or_allocator_rebind::type > map_type; typedef flat_multimap< ValueType , ValueType , std::less , typename boost::container::dtl::container_or_allocator_rebind::type > multimap_type; }; }; int main() { using namespace boost::container::test; //////////////////////////////////// // Testing sequence container implementations //////////////////////////////////// { typedef std::map MyStdMap; typedef std::multimap MyStdMultiMap; if (0 != test::map_test < GetMapContainer > >::apply::map_type , MyStdMap , GetMapContainer > >::apply::multimap_type , MyStdMultiMap>()) { std::cout << "Error in map_test > >" << std::endl; return 1; } if (0 != test::map_test < GetMapContainer, 7> >::apply::map_type , MyStdMap , GetMapContainer, 7> >::apply::multimap_type , MyStdMultiMap>()) { std::cout << "Error in map_test, 7> >" << std::endl; return 1; } if (0 != test::map_test < GetMapContainer, MaxElem * 10> >::apply::map_type , MyStdMap , GetMapContainer, MaxElem * 10> >::apply::multimap_type , MyStdMultiMap>()) { std::cout << "Error in map_test, MaxElem * 10> >" << std::endl; return 1; } if (0 != test::map_test < GetMapContainer > >::apply::map_type , MyStdMap , GetMapContainer > >::apply::multimap_type , MyStdMultiMap>()) { std::cout << "Error in map_test > >" << std::endl; return 1; } if (0 != test::map_test < GetMapContainer > >::apply::map_type , MyStdMap , GetMapContainer > >::apply::multimap_type , MyStdMultiMap>()) { std::cout << "Error in map_test > >" << std::endl; return 1; } } return 0; }