From 55de894ac936d1d6ae2860553512307f8a4e9480 Mon Sep 17 00:00:00 2001 From: khizmax Date: Fri, 10 Oct 2014 09:02:26 +0400 Subject: [PATCH] Boost::intrusive 1.56 compatibility --- ...dr_intrusive_refinable_hashset_splayset.cpp | 17 ++++++++++++----- .../hdr_intrusive_striped_hashset_splayset.cpp | 18 +++++++++++++----- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_splayset.cpp b/tests/test-hdr/set/hdr_intrusive_refinable_hashset_splayset.cpp index 2e1ac245..f549466d 100644 --- a/tests/test-hdr/set/hdr_intrusive_refinable_hashset_splayset.cpp +++ b/tests/test-hdr/set/hdr_intrusive_refinable_hashset_splayset.cpp @@ -8,8 +8,15 @@ namespace set { namespace bi = boost::intrusive; namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::splay_set_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::splay_set_member_hook<> > member_item_type; +# if BOOST_VERSION < 105600 + typedef bi::splay_set_member_hook<> splay_set_member_hook; + typedef bi::splay_set_base_hook<> splay_set_base_hook; +#else + typedef bi::bs_set_base_hook<> splay_set_member_hook; + typedef bi::bs_set_member_hook<> splay_set_base_hook; +#endif + typedef IntrusiveStripedSetHdrTest::base_item< splay_set_base_hook > base_item_type; + typedef IntrusiveStripedSetHdrTest::member_item< splay_set_member_hook > member_item_type; } void IntrusiveStripedSetHdrTest::Refinable_splay_set_basehook() @@ -54,7 +61,7 @@ namespace set { typedef ci::StripedSet< bi::splay_set< member_item_type - , bi::member_hook< member_item_type, bi::splay_set_member_hook<>, &member_item_type::hMember> + , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember> , bi::compare > > ,co::mutex_policy< ci::striped_set::refinable<> > @@ -69,7 +76,7 @@ namespace set { typedef ci::StripedSet< bi::splay_set< member_item_type - , bi::member_hook< member_item_type, bi::splay_set_member_hook<>, &member_item_type::hMember> + , bi::member_hook< member_item_type, bsplay_set_member_hook, &member_item_type::hMember> , bi::compare > > ,co::mutex_policy< ci::striped_set::refinable<> > @@ -85,7 +92,7 @@ namespace set { typedef ci::StripedSet< bi::splay_set< member_item_type - , bi::member_hook< member_item_type, bi::splay_set_member_hook<>, &member_item_type::hMember> + , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember> , bi::compare > > ,co::mutex_policy< ci::striped_set::refinable<> > diff --git a/tests/test-hdr/set/hdr_intrusive_striped_hashset_splayset.cpp b/tests/test-hdr/set/hdr_intrusive_striped_hashset_splayset.cpp index 1082ddf1..2e796b2f 100644 --- a/tests/test-hdr/set/hdr_intrusive_striped_hashset_splayset.cpp +++ b/tests/test-hdr/set/hdr_intrusive_striped_hashset_splayset.cpp @@ -8,8 +8,16 @@ namespace set { namespace bi = boost::intrusive; namespace { - typedef IntrusiveStripedSetHdrTest::base_item< bi::splay_set_base_hook<> > base_item_type; - typedef IntrusiveStripedSetHdrTest::member_item< bi::splay_set_member_hook<> > member_item_type; +# if BOOST_VERSION < 105600 + typedef bi::splay_set_member_hook<> splay_set_member_hook; + typedef bi::splay_set_base_hook<> splay_set_base_hook; +#else + typedef bi::bs_set_base_hook<> splay_set_member_hook; + typedef bi::bs_set_member_hook<> splay_set_base_hook; +#endif + + typedef IntrusiveStripedSetHdrTest::base_item< splay_set_base_hook> base_item_type; + typedef IntrusiveStripedSetHdrTest::member_item< splay_set_member_hook > member_item_type; } void IntrusiveStripedSetHdrTest::Striped_splay_set_basehook() @@ -51,7 +59,7 @@ namespace set { typedef ci::StripedSet< bi::splay_set< member_item_type - , bi::member_hook< member_item_type, bi::splay_set_member_hook<>, &member_item_type::hMember> + , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember> , bi::compare > > ,co::hash< IntrusiveStripedSetHdrTest::hash_int > @@ -65,7 +73,7 @@ namespace set { typedef ci::StripedSet< bi::splay_set< member_item_type - , bi::member_hook< member_item_type, bi::splay_set_member_hook<>, &member_item_type::hMember> + , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember> , bi::compare > > ,co::hash< IntrusiveStripedSetHdrTest::hash_int > @@ -80,7 +88,7 @@ namespace set { typedef ci::StripedSet< bi::splay_set< member_item_type - , bi::member_hook< member_item_type, bi::splay_set_member_hook<>, &member_item_type::hMember> + , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember> , bi::compare > > ,co::hash< IntrusiveStripedSetHdrTest::hash_int > -- 2.34.1