///////////////////////////////////////////////////////////////////////////// // // (C) Copyright Olaf Krzikalla 2004-2006. // (C) Copyright Ion Gaztanaga 2006-2009. // // 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/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// #include #include #include #include "itestvalue.hpp" #include "smart_ptr.hpp" #include "generic_multiset_test.hpp" namespace boost { namespace intrusive { namespace test { #if !defined (BOOST_INTRUSIVE_VARIADIC_TEMPLATES) template #else template #endif struct has_insert_before > { static const bool value = true; }; }}} using namespace boost::intrusive; struct my_tag; template struct hooks { typedef avl_set_base_hook > base_hook_type; typedef avl_set_base_hook , void_pointer , tag , optimize_size > auto_base_hook_type; typedef avl_set_member_hook > member_hook_type; typedef avl_set_member_hook < link_mode , void_pointer > auto_member_hook_type; }; template< class ValueType , class Option1 = boost::intrusive::none , class Option2 = boost::intrusive::none , class Option3 = boost::intrusive::none > struct GetContainer { typedef boost::intrusive::avl_multiset < ValueType , Option1 , Option2 , Option3 > type; }; template class test_main_template { public: int operator()() { using namespace boost::intrusive; typedef testvalue , constant_time_size> value_type; test::test_generic_multiset < typename detail::get_base_value_traits < value_type , typename hooks::base_hook_type >::type , GetContainer >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits < value_type , member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > >::type , GetContainer >::test_all(); return 0; } }; template class test_main_template { public: int operator()() { using namespace boost::intrusive; typedef testvalue , false> value_type; test::test_generic_multiset < typename detail::get_base_value_traits < value_type , typename hooks::base_hook_type >::type , GetContainer >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits < value_type , member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > >::type , GetContainer >::test_all(); test::test_generic_multiset < typename detail::get_base_value_traits < value_type , typename hooks::auto_base_hook_type >::type , GetContainer >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits < value_type , member_hook< value_type , typename hooks::auto_member_hook_type , &value_type::auto_node_ > >::type , GetContainer >::test_all(); return 0; } }; int main( int, char* [] ) { test_main_template()(); test_main_template, false>()(); test_main_template()(); test_main_template, true>()(); return boost::report_errors(); } #include