From 414ca9f33821b26eb4f223236a3e5a20dc79cd64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sat, 18 Oct 2014 17:02:23 +0200 Subject: [PATCH] Break options.hpp dependencies, now hooks don't depend on heavy meta-machinery. --- include/boost/intrusive/any_hook.hpp | 66 +++--- include/boost/intrusive/avltree.hpp | 11 +- include/boost/intrusive/bstree.hpp | 11 +- .../boost/intrusive/detail/generic_hook.hpp | 1 + .../intrusive/detail/get_value_traits.hpp | 218 ++++++++++++++++++ .../boost/intrusive/detail/hook_traits.hpp | 56 ----- include/boost/intrusive/hashtable.hpp | 22 +- include/boost/intrusive/list.hpp | 11 +- include/boost/intrusive/options.hpp | 179 +------------- include/boost/intrusive/rbtree.hpp | 11 +- include/boost/intrusive/sgtree.hpp | 4 +- include/boost/intrusive/slist.hpp | 11 +- include/boost/intrusive/splaytree.hpp | 4 +- include/boost/intrusive/treap.hpp | 4 +- .../vc7ide/_intrusivelib/_intrusivelib.vcproj | 3 + test/avl_multiset_test.cpp | 12 +- test/avl_set_test.cpp | 12 +- test/container_size_test.cpp | 3 - test/custom_bucket_traits_test.cpp | 22 +- test/list_test.cpp | 13 +- test/make_functions_test.cpp | 74 ++---- test/multiset_test.cpp | 12 +- test/set_test.cpp | 13 +- test/sg_multiset_test.cpp | 7 +- test/sg_set_test.cpp | 8 +- test/slist_test.cpp | 29 +-- test/splay_multiset_test.cpp | 20 +- test/splay_set_test.cpp | 11 +- test/treap_multiset_test.cpp | 13 +- test/treap_set_test.cpp | 12 +- test/unordered_multiset_test.cpp | 12 +- test/unordered_set_test.cpp | 11 +- 32 files changed, 424 insertions(+), 472 deletions(-) create mode 100644 include/boost/intrusive/detail/get_value_traits.hpp diff --git a/include/boost/intrusive/any_hook.hpp b/include/boost/intrusive/any_hook.hpp index 697caa4..1b53837 100644 --- a/include/boost/intrusive/any_hook.hpp +++ b/include/boost/intrusive/any_hook.hpp @@ -22,13 +22,12 @@ #include #include #include +#include #include namespace boost { namespace intrusive { -struct any_empty{}; - //! Helper metafunction to define a \c \c any_base_hook that yields to the same //! type when the same options (either explicitly or implicitly) are used. #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) @@ -238,39 +237,34 @@ class any_member_hook namespace detail{ -template -struct any_to_get_base_pointer_type -{ - typedef typename pointer_rebind - ::type type; -}; - -template -struct any_to_get_member_pointer_type -{ - typedef typename pointer_rebind - ::type type; -}; +BOOST_INTRUSIVE_INTERNAL_STATIC_BOOL_IS_TRUE(old_proto_value_traits_base_hook, hooktags::is_base_hook) //!This option setter specifies that the container //!must use the specified base hook -template class NodeTraits> +template class NodeTraits> struct any_to_some_hook { - typedef typename BaseHook::template pack::proto_value_traits old_proto_value_traits; + typedef typename BasicHook::template pack::proto_value_traits old_proto_value_traits; template struct pack : public Base { - struct proto_value_traits : public old_proto_value_traits + struct proto_value_traits { + //proto_value_traits::hooktags::is_base_hook is used by get_value_traits + //to detect base hooks, so mark it in case BasicHook has it. + struct hooktags + { + static const bool is_base_hook = old_proto_value_traits_base_hook_bool_is_true + ::value; + }; + + typedef old_proto_value_traits basic_hook_t; static const bool is_any_hook = true; - typedef typename detail::eval_if_c - < detail::internal_base_hook_bool_is_true::value - , any_to_get_base_pointer_type - , any_to_get_member_pointer_type - >::type void_pointer; - typedef NodeTraits node_traits; + + template + struct node_traits_from_voidptr + { typedef NodeTraits type; }; }; }; }; @@ -281,55 +275,55 @@ struct any_to_some_hook //!This option setter specifies that //!any hook should behave as an slist hook -template +template struct any_to_slist_hook /// @cond - : public detail::any_to_some_hook + : public detail::any_to_some_hook /// @endcond {}; //!This option setter specifies that //!any hook should behave as an list hook -template +template struct any_to_list_hook /// @cond - : public detail::any_to_some_hook + : public detail::any_to_some_hook /// @endcond {}; //!This option setter specifies that //!any hook should behave as a set hook -template +template struct any_to_set_hook /// @cond - : public detail::any_to_some_hook + : public detail::any_to_some_hook /// @endcond {}; //!This option setter specifies that //!any hook should behave as an avl_set hook -template +template struct any_to_avl_set_hook /// @cond - : public detail::any_to_some_hook + : public detail::any_to_some_hook /// @endcond {}; //!This option setter specifies that any //!hook should behave as a bs_set hook -template +template struct any_to_bs_set_hook /// @cond - : public detail::any_to_some_hook + : public detail::any_to_some_hook /// @endcond {}; //!This option setter specifies that any hook //!should behave as an unordered set hook -template +template struct any_to_unordered_set_hook /// @cond - : public detail::any_to_some_hook + : public detail::any_to_some_hook /// @endcond {}; diff --git a/include/boost/intrusive/avltree.hpp b/include/boost/intrusive/avltree.hpp index a59dfec..d2adf24 100644 --- a/include/boost/intrusive/avltree.hpp +++ b/include/boost/intrusive/avltree.hpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -40,9 +40,16 @@ namespace intrusive { /// @cond +struct default_avltree_hook_applier +{ template struct apply{ typedef typename T::default_avltree_hook type; }; }; + +template<> +struct is_default_hook_tag +{ static const bool value = true; }; + struct avltree_defaults { - typedef detail::default_avltree_hook proto_value_traits; + typedef default_avltree_hook_applier proto_value_traits; static const bool constant_time_size = true; typedef std::size_t size_type; typedef void compare; diff --git a/include/boost/intrusive/bstree.hpp b/include/boost/intrusive/bstree.hpp index bf63f3a..44b02bb 100644 --- a/include/boost/intrusive/bstree.hpp +++ b/include/boost/intrusive/bstree.hpp @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include @@ -56,9 +56,16 @@ namespace intrusive { /// @cond +struct default_bstree_hook_applier +{ template struct apply{ typedef typename T::default_bstree_hook type; }; }; + +template<> +struct is_default_hook_tag +{ static const bool value = true; }; + struct bstree_defaults { - typedef detail::default_bstree_hook proto_value_traits; + typedef default_bstree_hook_applier proto_value_traits; static const bool constant_time_size = true; typedef std::size_t size_type; typedef void compare; diff --git a/include/boost/intrusive/detail/generic_hook.hpp b/include/boost/intrusive/detail/generic_hook.hpp index 41f3763..c5af081 100644 --- a/include/boost/intrusive/detail/generic_hook.hpp +++ b/include/boost/intrusive/detail/generic_hook.hpp @@ -21,6 +21,7 @@ #include #include #include +#include #include namespace boost { diff --git a/include/boost/intrusive/detail/get_value_traits.hpp b/include/boost/intrusive/detail/get_value_traits.hpp new file mode 100644 index 0000000..6f5a9e3 --- /dev/null +++ b/include/boost/intrusive/detail/get_value_traits.hpp @@ -0,0 +1,218 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2014-2014 +// +// 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. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_DETAIL_GET_VALUE_TRAITS_HPP +#define BOOST_INTRUSIVE_DETAIL_GET_VALUE_TRAITS_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include + +namespace boost { +namespace intrusive { + +#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED + +template +struct is_default_hook_tag +{ static const bool value = false; }; + +namespace detail{ + +template +struct concrete_hook_base_value_traits +{ + typedef typename BaseHook::hooktags tags; + typedef bhtraits + < T + , typename tags::node_traits + , tags::link_mode + , typename tags::tag + , tags::type> type; +}; + +template +struct concrete_hook_base_value_traits +{ + typedef typename BaseHook::hooktags type; +}; + +template +struct any_hook_base_value_traits +{ + //AnyToSomeHook value_traits derive from a generic_hook + //The generic_hook is configured with any_node_traits + //and AnyToSomeHook::value_traits with the correct + //node traits for the container, so use node_traits + //from AnyToSomeHook_ProtoValueTraits and the rest of + //elements from the hooktags member of the generic_hook + + typedef typename AnyToSomeHook_ProtoValueTraits::basic_hook_t basic_hook_t; + typedef typename pointer_rebind + < typename basic_hook_t::hooktags::node_traits::node_ptr + , void>::type void_pointer; + typedef typename AnyToSomeHook_ProtoValueTraits::template + node_traits_from_voidptr::type node_traits; + + typedef bhtraits + < T + , node_traits + , basic_hook_t::hooktags::link_mode + , typename basic_hook_t::hooktags::tag + , basic_hook_t::hooktags::type + > type; +}; + +template +struct any_hook_base_value_traits +{ + typedef typename AnyToSomeHook_ProtoValueTraits::basic_hook_t basic_hook_t; + typedef typename pointer_rebind + < typename basic_hook_t::hooktags::node_traits::node_ptr + , void>::type void_pointer; + + struct type + { + typedef typename AnyToSomeHook_ProtoValueTraits::template + node_traits_from_voidptr::type node_traits; + }; +}; + +template +struct get_member_value_traits +{ + typedef typename MemberHook::member_value_traits type; +}; + +BOOST_INTRUSIVE_INTERNAL_STATIC_BOOL_IS_TRUE(internal_any_hook, is_any_hook) +BOOST_INTRUSIVE_INTERNAL_STATIC_BOOL_IS_TRUE(internal_base_hook, hooktags::is_base_hook) + +template +struct internal_member_value_traits +{ + template static one test(...); + template static two test(typename U::member_value_traits* = 0); + static const bool value = sizeof(test(0)) == sizeof(two); +}; + +template::value> +struct supposed_value_traits; + +template::value> +struct get_base_value_traits; + +template::value> +struct supposed_base_value_traits; + +template::value> +struct supposed_member_value_traits; + +template::value> +struct any_or_concrete_value_traits; + +//Base any hook +template +struct get_base_value_traits + : any_hook_base_value_traits +{}; + +//Non-any base hook +template +struct get_base_value_traits + : concrete_hook_base_value_traits +{}; + +//...It's a default hook +template +struct supposed_value_traits +{ typedef typename SupposedValueTraits::template apply::type type; }; + +//...Not a default hook +template +struct supposed_value_traits +{ typedef SupposedValueTraits type; }; + +//...It's a base hook +template +struct supposed_base_value_traits + : get_base_value_traits +{}; + +//...Not a base hook, try if it's a member or value_traits +template +struct supposed_base_value_traits + : supposed_member_value_traits +{}; + +//...It's a member hook +template +struct supposed_member_value_traits + : get_member_value_traits +{}; + +//...Not a member hook +template +struct supposed_member_value_traits + : any_or_concrete_value_traits +{}; + +template +struct any_or_concrete_value_traits +{ + //A hook node (non-base, e.g.: member or other value traits + typedef typename AnyToSomeHook_ProtoValueTraits::basic_hook_t basic_hook_t; + typedef typename pointer_rebind + ::type void_pointer; + typedef typename AnyToSomeHook_ProtoValueTraits::template + node_traits_from_voidptr::type any_node_traits; + + struct type : basic_hook_t + { + typedef any_node_traits node_traits; + }; +}; + +template +struct any_or_concrete_value_traits +{ + typedef SupposedValueTraits type; +}; + +//////////////////////////////////////// +// get_value_traits / get_node_traits +//////////////////////////////////////// + +template +struct get_value_traits + : supposed_base_value_traits::type, T> +{}; + +template +struct get_node_traits +{ + typedef typename get_value_traits::type::node_traits type; +}; + +} //namespace detail{ + +#endif //BOOST_INTRUSIVE_DOXYGEN_INVOKED + +} //namespace intrusive { +} //namespace boost { + +#include + +#endif //#ifndef BOOST_INTRUSIVE_DETAIL_GET_VALUE_TRAITS_HPP diff --git a/include/boost/intrusive/detail/hook_traits.hpp b/include/boost/intrusive/detail/hook_traits.hpp index e0aeb29..c9c115b 100644 --- a/include/boost/intrusive/detail/hook_traits.hpp +++ b/include/boost/intrusive/detail/hook_traits.hpp @@ -83,62 +83,6 @@ struct bhtraits typedef NodeTraits node_traits; }; -/* -template::element_type T::* P> -struct mhtraits_base -{ - public: - typedef typename pointer_traits::element_type node; - typedef T value_type; - typedef NodePtr node_ptr; - typedef typename pointer_traits:: - template rebind_pointer::type const_node_ptr; - typedef typename pointer_traits:: - template rebind_pointer::type pointer; - typedef typename pointer_traits:: - template rebind_pointer::type const_pointer; - typedef T & reference; - typedef const T & const_reference; - typedef node& node_reference; - typedef const node & const_node_reference; - - static node_ptr to_node_ptr(reference value) - { - return pointer_traits::pointer_to - (static_cast(value.*P)); - } - - static const_node_ptr to_node_ptr(const_reference value) - { - return pointer_traits::pointer_to - (static_cast(value.*P)); - } - - static pointer to_value_ptr(const node_ptr & n) - { - return pointer_traits::pointer_to - (*detail::parent_from_member - (boost::intrusive::detail::to_raw_pointer(n), P)); - } - - static const_pointer to_value_ptr(const const_node_ptr & n) - { - return pointer_traits::pointer_to - (*detail::parent_from_member - (boost::intrusive::detail::to_raw_pointer(n), P)); - } -}; - - -template -struct mhtraits - : public mhtraits_base -{ - static const link_mode_type link_mode = LinkMode; - typedef NodeTraits node_traits; -}; -*/ - template struct mhtraits diff --git a/include/boost/intrusive/hashtable.hpp b/include/boost/intrusive/hashtable.hpp index 8deb44b..af73f70 100644 --- a/include/boost/intrusive/hashtable.hpp +++ b/include/boost/intrusive/hashtable.hpp @@ -463,7 +463,7 @@ template struct unordered_bucket : public detail::unordered_bucket_impl ::proto_value_traits + template pack::proto_value_traits > {}; @@ -472,10 +472,10 @@ struct unordered_bucket //!a hash container. template struct unordered_bucket_ptr - : public detail::unordered_bucket_ptr_impl - ::proto_value_traits - > + : public detail::unordered_bucket_ptr_impl + ::proto_value_traits + > {}; //!This metafunction will obtain the type of the default bucket traits @@ -486,7 +486,7 @@ template struct unordered_default_bucket_traits { typedef typename ValueTraitsOrHookOption:: - template pack::proto_value_traits supposed_value_traits; + template pack::proto_value_traits supposed_value_traits; typedef typename detail:: get_slist_impl_from_supposed_value_traits ::type slist_impl; @@ -497,9 +497,17 @@ struct unordered_default_bucket_traits struct default_bucket_traits; +//hashtable default hook traits +struct default_hashtable_hook_applier +{ template struct apply{ typedef typename T::default_hashtable_hook type; }; }; + +template<> +struct is_default_hook_tag +{ static const bool value = true; }; + struct hashtable_defaults { - typedef detail::default_hashtable_hook proto_value_traits; + typedef default_hashtable_hook_applier proto_value_traits; typedef std::size_t size_type; typedef void equal; typedef void hash; diff --git a/include/boost/intrusive/list.hpp b/include/boost/intrusive/list.hpp index 3443654..297267d 100644 --- a/include/boost/intrusive/list.hpp +++ b/include/boost/intrusive/list.hpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -51,9 +51,16 @@ namespace intrusive { /// @cond +struct default_list_hook_applier +{ template struct apply{ typedef typename T::default_list_hook type; }; }; + +template<> +struct is_default_hook_tag +{ static const bool value = true; }; + struct list_defaults { - typedef detail::default_list_hook proto_value_traits; + typedef default_list_hook_applier proto_value_traits; static const bool constant_time_size = true; typedef std::size_t size_type; typedef void header_holder_type; diff --git a/include/boost/intrusive/options.hpp b/include/boost/intrusive/options.hpp index efa9386..9a77750 100644 --- a/include/boost/intrusive/options.hpp +++ b/include/boost/intrusive/options.hpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2007-2013 +// (C) Copyright Ion Gaztanaga 2007-2014 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at @@ -22,177 +22,29 @@ #include #include #include -#include -#include namespace boost { namespace intrusive { #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED +struct empty +{}; + +template +struct fhtraits; + +template +struct mhtraits; + //typedef void default_tag; struct default_tag; struct member_tag; -namespace detail{ - -struct default_hook_tag{}; - -#define BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER) \ -struct BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER : public default_hook_tag\ -{\ - template \ - struct apply\ - { typedef typename T::BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER type; };\ -}\ - -BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_list_hook); -BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_slist_hook); -BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_rbtree_hook); -BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_hashtable_hook); -BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_avltree_hook); -BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION(default_bstree_hook); - -#undef BOOST_INTRUSIVE_DEFAULT_HOOK_MARKER_DEFINITION - -template -struct concrete_hook_base_value_traits -{ - typedef typename BaseHook::hooktags tags; - typedef bhtraits - < T - , typename tags::node_traits - , tags::link_mode - , typename tags::tag - , tags::type> type; -}; - -template -struct concrete_hook_base_node_traits -{ typedef typename BaseHook::hooktags::node_traits type; }; - -template -struct any_hook_base_value_traits -{ - //AnyToSomeHook value_traits derive from a generic_hook - //The generic_hook is configured with any_node_traits - //and AnyToSomeHook::value_traits with the correct - //node traits for the container, so use node_traits - //from AnyToSomeHook_ProtoValueTraits and the rest of - //elements from the hooktags member of the generic_hook - typedef AnyToSomeHook_ProtoValueTraits proto_value_traits; - typedef bhtraits - < T - , typename proto_value_traits::node_traits - , proto_value_traits::hooktags::link_mode - , typename proto_value_traits::hooktags::tag - , proto_value_traits::hooktags::type - > type; -}; - -template -struct any_hook_base_node_traits -{ typedef typename BaseHook::node_traits type; }; - - -BOOST_INTRUSIVE_INTERNAL_STATIC_BOOL_IS_TRUE(internal_any_hook, is_any_hook) - -template -struct get_base_value_traits -{ - typedef typename eval_if_c - < internal_any_hook_bool_is_true::value - , any_hook_base_value_traits - , concrete_hook_base_value_traits - >::type type; -}; - -template -struct get_base_node_traits -{ - typedef typename eval_if_c - < internal_any_hook_bool_is_true::value - , any_hook_base_node_traits - , concrete_hook_base_node_traits - >::type type; -}; - -template -struct get_member_value_traits -{ - typedef typename MemberHook::member_value_traits type; -}; - -template -struct get_member_node_traits -{ - typedef typename MemberHook::member_value_traits::node_traits type; -}; - -template -struct internal_member_value_traits -{ - template static one test(...); - template static two test(typename U::member_value_traits* = 0); - static const bool value = sizeof(test(0)) == sizeof(two); -}; - -BOOST_INTRUSIVE_INTERNAL_STATIC_BOOL_IS_TRUE(internal_base_hook, hooktags::is_base_hook) - -template -struct get_value_traits -{ - typedef typename eval_if_c - ::value - ,apply - ,identity - >::type supposed_value_traits; - - //...if it's a default hook - typedef typename eval_if_c - < internal_base_hook_bool_is_true::value - //...get it's internal value traits using - //the provided T value type. - , get_base_value_traits - //...else use its internal value traits tag - //(member hooks and custom value traits are in this group) - , eval_if_c - < internal_member_value_traits::value - , get_member_value_traits - , identity - > - >::type type; -}; - -template -struct get_explicit_node_traits -{ - typedef typename ValueTraits::node_traits type; -}; - template -struct get_node_traits -{ - typedef SupposedValueTraits supposed_value_traits; - //...if it's a base hook - typedef typename eval_if_c - < internal_base_hook_bool_is_true::value - //...get it's internal value traits using - //the provided T value type. - , get_base_node_traits - //...else use its internal value traits tag - //(member hooks and custom value traits are in this group) - , eval_if_c - < internal_member_value_traits::value - , get_member_node_traits - , get_explicit_node_traits - > - >::type type; -}; +struct is_default_hook_tag; -} //namespace detail{ - -#endif //BOOST_INTRUSIVE_DOXYGEN_INVOKED +#endif //#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED //!This option setter specifies if the intrusive //!container stores its size as a member to @@ -375,13 +227,6 @@ BOOST_INTRUSIVE_OPTION_CONSTANT(incremental, bool, Enabled, incremental) /// @cond -struct none -{ - template - struct pack : Base - {}; -}; - struct hook_defaults { typedef void* void_pointer; diff --git a/include/boost/intrusive/rbtree.hpp b/include/boost/intrusive/rbtree.hpp index f595a90..d6e692e 100644 --- a/include/boost/intrusive/rbtree.hpp +++ b/include/boost/intrusive/rbtree.hpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include @@ -40,9 +40,16 @@ namespace intrusive { /// @cond +struct default_rbtree_hook_applier +{ template struct apply{ typedef typename T::default_rbtree_hook type; }; }; + +template<> +struct is_default_hook_tag +{ static const bool value = true; }; + struct rbtree_defaults { - typedef detail::default_rbtree_hook proto_value_traits; + typedef default_rbtree_hook_applier proto_value_traits; static const bool constant_time_size = true; typedef std::size_t size_type; typedef void compare; diff --git a/include/boost/intrusive/sgtree.hpp b/include/boost/intrusive/sgtree.hpp index cbeacdb..5df70f8 100644 --- a/include/boost/intrusive/sgtree.hpp +++ b/include/boost/intrusive/sgtree.hpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include @@ -195,7 +195,7 @@ struct alpha_holder struct sgtree_defaults { - typedef detail::default_bstree_hook proto_value_traits; + typedef default_bstree_hook_applier proto_value_traits; static const bool constant_time_size = true; typedef std::size_t size_type; typedef void compare; diff --git a/include/boost/intrusive/slist.hpp b/include/boost/intrusive/slist.hpp index d5d8d2e..4698730 100644 --- a/include/boost/intrusive/slist.hpp +++ b/include/boost/intrusive/slist.hpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -66,9 +66,16 @@ struct header_holder_plus_last HeaderHolder header_holder_; }; +struct default_slist_hook_applier +{ template struct apply{ typedef typename T::default_slist_hook type; }; }; + +template<> +struct is_default_hook_tag +{ static const bool value = true; }; + struct slist_defaults { - typedef detail::default_slist_hook proto_value_traits; + typedef default_slist_hook_applier proto_value_traits; static const bool constant_time_size = true; static const bool linear = false; typedef std::size_t size_type; diff --git a/include/boost/intrusive/splaytree.hpp b/include/boost/intrusive/splaytree.hpp index 3ca50fc..6704642 100644 --- a/include/boost/intrusive/splaytree.hpp +++ b/include/boost/intrusive/splaytree.hpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -41,7 +41,7 @@ namespace intrusive { struct splaytree_defaults { - typedef detail::default_bstree_hook proto_value_traits; + typedef default_bstree_hook_applier proto_value_traits; static const bool constant_time_size = true; typedef std::size_t size_type; typedef void compare; diff --git a/include/boost/intrusive/treap.hpp b/include/boost/intrusive/treap.hpp index 638cef9..b3afb86 100644 --- a/include/boost/intrusive/treap.hpp +++ b/include/boost/intrusive/treap.hpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -46,7 +46,7 @@ namespace intrusive { struct treap_defaults { - typedef detail::default_bstree_hook proto_value_traits; + typedef default_bstree_hook_applier proto_value_traits; static const bool constant_time_size = true; typedef std::size_t size_type; typedef void compare; diff --git a/proj/vc7ide/_intrusivelib/_intrusivelib.vcproj b/proj/vc7ide/_intrusivelib/_intrusivelib.vcproj index 1679962..d5bcd6f 100644 --- a/proj/vc7ide/_intrusivelib/_intrusivelib.vcproj +++ b/proj/vc7ide/_intrusivelib/_intrusivelib.vcproj @@ -271,6 +271,9 @@ + + diff --git a/test/avl_multiset_test.cpp b/test/avl_multiset_test.cpp index 056889a..7bb3085 100644 --- a/test/avl_multiset_test.cpp +++ b/test/avl_multiset_test.cpp @@ -10,7 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include #include #include #include "itestvalue.hpp" @@ -123,8 +122,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -159,8 +157,7 @@ class test_main_template >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -176,8 +173,7 @@ class test_main_template >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::auto_member_hook_type , &value_type::auto_node_ > @@ -249,5 +245,3 @@ int main() return boost::report_errors(); } - -#include diff --git a/test/avl_set_test.cpp b/test/avl_set_test.cpp index 5e7403c..7654ab7 100644 --- a/test/avl_set_test.cpp +++ b/test/avl_set_test.cpp @@ -10,7 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include #include #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -123,8 +122,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -159,8 +157,7 @@ class test_main_template >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -176,8 +173,7 @@ class test_main_template >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::auto_member_hook_type , &value_type::auto_node_ > @@ -250,5 +246,3 @@ int main() return boost::report_errors(); } - -#include diff --git a/test/container_size_test.cpp b/test/container_size_test.cpp index 5b3343b..ba385e6 100644 --- a/test/container_size_test.cpp +++ b/test/container_size_test.cpp @@ -9,7 +9,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include #include #include @@ -215,5 +214,3 @@ int main() test_sizes(boolean< pow2_and_equal_sizes::value >(), sizeof(std::size_t)); return ::boost::report_errors(); } - -#include diff --git a/test/custom_bucket_traits_test.cpp b/test/custom_bucket_traits_test.cpp index 3fe850f..843cf84 100644 --- a/test/custom_bucket_traits_test.cpp +++ b/test/custom_bucket_traits_test.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include using namespace boost::intrusive; @@ -55,16 +56,19 @@ struct uset_value_traits //Base typedef base_hook< unordered_set_base_hook<> > BaseHook; typedef unordered_bucket::type BaseBucketType; +typedef unordered_bucket_ptr::type BaseBucketPtrType; typedef unordered_set BaseUset; //Member typedef member_hook < MyClass, unordered_set_member_hook<> , &MyClass::member_hook_ > MemberHook; typedef unordered_bucket::type MemberBucketType; +typedef unordered_bucket_ptr::type MemberBucketPtrType; typedef unordered_set MemberUset; //Explicit typedef value_traits< uset_value_traits > Traits; typedef unordered_bucket::type TraitsBucketType; +typedef unordered_bucket_ptr::type TraitsBucketPtrType; typedef unordered_set TraitsUset; struct uset_bucket_traits @@ -95,16 +99,14 @@ typedef unordered_set int main() { - if(!detail::is_same::value) - return 1; - if(!detail::is_same::value) - return 1; - if(!detail::is_same::value) - return 1; - if(!detail::is_same::value) - return 1; - if(!detail::is_same::value) - return 1; + BOOST_STATIC_ASSERT((detail::is_same::value)); + BOOST_STATIC_ASSERT((detail::is_same::value)); + BOOST_STATIC_ASSERT((detail::is_same::value)); + BOOST_STATIC_ASSERT((detail::is_same::value)); + BOOST_STATIC_ASSERT((detail::is_same::value)); + BOOST_STATIC_ASSERT((detail::is_same::value)); + BOOST_STATIC_ASSERT((detail::is_same::value)); + BOOST_STATIC_ASSERT((detail::is_same::value)); typedef std::vector::iterator VectIt; typedef std::vector::reverse_iterator VectRit; diff --git a/test/list_test.cpp b/test/list_test.cpp index d250bb0..31f2b39 100644 --- a/test/list_test.cpp +++ b/test/list_test.cpp @@ -1,3 +1,4 @@ +/* ///////////////////////////////////////////////////////////////////////////// // // (C) Copyright Olaf Krzikalla 2004-2006. @@ -10,7 +11,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include #include #include #include "itestvalue.hpp" @@ -410,7 +410,6 @@ class test_main_template std::vector< value_type > >::test_all(data); make_and_test_list < typename detail::get_member_value_traits < - value_type, member_hook< value_type, typename hooks::member_hook_type, &value_type::node_> >::type, ConstantTimeSize, @@ -452,7 +451,6 @@ class test_main_template< VoidPointer, false, Default_Holder > std::vector< value_type > >::test_all(data); make_and_test_list < typename detail::get_member_value_traits < - value_type, member_hook< value_type, typename hooks::member_hook_type, &value_type::node_> >::type, false, @@ -475,7 +473,6 @@ class test_main_template< VoidPointer, false, Default_Holder > std::vector< value_type > >::test_all(data); make_and_test_list < typename detail::get_member_value_traits < - value_type, member_hook< value_type, typename hooks::auto_member_hook_type, &value_type::auto_node_> >::type, false, @@ -544,3 +541,11 @@ int main() return boost::report_errors(); } +*/ + +#include + +int main() +{ + return 0; +} \ No newline at end of file diff --git a/test/make_functions_test.cpp b/test/make_functions_test.cpp index dcb8bc4..0355412 100644 --- a/test/make_functions_test.cpp +++ b/test/make_functions_test.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include "smart_ptr.hpp" #include @@ -147,79 +148,54 @@ int main() } //Check defined types and implicitly defined types are equal - if(detail::is_same, link_mode >::type + BOOST_STATIC_ASSERT((detail::is_same, link_mode >::type ,make_list_base_hook<>::type - >::value == false){ - return 1; - } + >::value)); - if(detail::is_same, link_mode >::type + BOOST_STATIC_ASSERT((detail::is_same, link_mode >::type ,make_slist_base_hook<>::type - >::value == false){ - return 1; - } + >::value)); - if(detail::is_same, link_mode >::type + BOOST_STATIC_ASSERT((detail::is_same, link_mode >::type ,make_set_base_hook<>::type - >::value == false){ - return 1; - } + >::value)); - if(detail::is_same, link_mode >::type + BOOST_STATIC_ASSERT((detail::is_same, link_mode >::type ,make_unordered_set_base_hook<>::type - >::value == false){ - return 1; - } + >::value)); - if(detail::is_same, link_mode >::type + BOOST_STATIC_ASSERT((detail::is_same, link_mode >::type ,make_avl_set_base_hook<>::type - >::value == false){ - return 1; - } + >::value)); - if(detail::is_same, link_mode >::type + BOOST_STATIC_ASSERT((detail::is_same, link_mode >::type ,make_bs_set_base_hook<>::type - >::value == false){ - return 1; - } + >::value)); //Check defined types and implicitly defined types are unequal - if(detail::is_same, link_mode >::type + BOOST_STATIC_ASSERT(!(detail::is_same, link_mode >::type ,make_list_base_hook<>::type - >::value == true){ - return 1; - } + >::value)); - if(detail::is_same, link_mode >::type + BOOST_STATIC_ASSERT(!(detail::is_same, link_mode >::type ,make_slist_base_hook<>::type - >::value == true){ - return 1; - } + >::value)); - if(detail::is_same, link_mode >::type + BOOST_STATIC_ASSERT(!(detail::is_same, link_mode >::type ,make_set_base_hook<>::type - >::value == true){ - return 1; - } + >::value)); - if(detail::is_same, link_mode >::type + BOOST_STATIC_ASSERT(!(detail::is_same, link_mode >::type ,make_unordered_set_base_hook<>::type - >::value == true){ - return 1; - } + >::value)); - if(detail::is_same, link_mode >::type + BOOST_STATIC_ASSERT(!(detail::is_same, link_mode >::type ,make_avl_set_base_hook<>::type - >::value == true){ - return 1; - } + >::value)); - if(detail::is_same, link_mode >::type + BOOST_STATIC_ASSERT(!(detail::is_same, link_mode >::type ,make_bs_set_base_hook<>::type - >::value == true){ - return 1; - } - + >::value)); return 0; } diff --git a/test/multiset_test.cpp b/test/multiset_test.cpp index 7cf374c..1496c56 100644 --- a/test/multiset_test.cpp +++ b/test/multiset_test.cpp @@ -10,7 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include #include #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -123,8 +122,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -159,8 +157,7 @@ class test_main_template >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -176,8 +173,7 @@ class test_main_template >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::auto_member_hook_type , &value_type::auto_node_ > @@ -245,5 +241,3 @@ int main() return boost::report_errors(); } - -#include diff --git a/test/set_test.cpp b/test/set_test.cpp index e712029..feeefc0 100644 --- a/test/set_test.cpp +++ b/test/set_test.cpp @@ -10,8 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include - #include #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -124,8 +122,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -160,8 +157,7 @@ class test_main_template >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -177,8 +173,7 @@ class test_main_template >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::auto_member_hook_type , &value_type::auto_node_ > @@ -248,5 +243,3 @@ int main() return boost::report_errors(); } - -#include diff --git a/test/sg_multiset_test.cpp b/test/sg_multiset_test.cpp index 1ce5611..4658c8e 100644 --- a/test/sg_multiset_test.cpp +++ b/test/sg_multiset_test.cpp @@ -10,7 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include #include #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -214,8 +213,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -229,8 +227,7 @@ class test_main_template , GetContainerFixedAlpha_With_Holder< Default_Holder >::template GetContainerFixedAlpha >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > diff --git a/test/sg_set_test.cpp b/test/sg_set_test.cpp index 8a3363a..0cb1da6 100644 --- a/test/sg_set_test.cpp +++ b/test/sg_set_test.cpp @@ -9,7 +9,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include #include #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -211,8 +210,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -227,8 +225,7 @@ class test_main_template , GetContainerFixedAlpha_With_Holder< Default_Holder >::template GetContainerFixedAlpha >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -301,4 +298,3 @@ int main() return boost::report_errors(); } -#include diff --git a/test/slist_test.cpp b/test/slist_test.cpp index 4c2cb9d..7398e4a 100644 --- a/test/slist_test.cpp +++ b/test/slist_test.cpp @@ -11,7 +11,6 @@ // ///////////////////////////////////////////////////////////////////////////// -#include #include #include #include "itestvalue.hpp" @@ -494,8 +493,7 @@ class test_main_template , std::vector< value_type > >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -531,8 +529,7 @@ class test_main_template >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -556,8 +553,7 @@ class test_main_template , std::vector< value_type > >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -582,8 +578,7 @@ class test_main_template >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -621,8 +616,7 @@ class test_main_template >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -646,8 +640,7 @@ class test_main_template >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::auto_member_hook_type , &value_type::auto_node_ > @@ -671,8 +664,7 @@ class test_main_template >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -697,8 +689,7 @@ class test_main_template >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -722,8 +713,7 @@ class test_main_template >::test_all(data); make_and_test_slist < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -790,4 +780,3 @@ int main(int, char* []) return boost::report_errors(); } -#include diff --git a/test/splay_multiset_test.cpp b/test/splay_multiset_test.cpp index 7682cdb..82cc446 100644 --- a/test/splay_multiset_test.cpp +++ b/test/splay_multiset_test.cpp @@ -10,7 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include #include #include #include "itestvalue.hpp" @@ -154,8 +153,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -191,10 +189,9 @@ class test_main_template >::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_ + < member_hook< value_type + , typename hooks::member_hook_type + , &value_type::node_ > >::type , GetContainer_With_Holder< Default_Holder >::template GetContainer @@ -208,11 +205,10 @@ class test_main_template >::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_ - > + < member_hook< value_type + , typename hooks::auto_member_hook_type + , &value_type::auto_node_ + > >::type , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); diff --git a/test/splay_set_test.cpp b/test/splay_set_test.cpp index 697f6b3..5082908 100644 --- a/test/splay_set_test.cpp +++ b/test/splay_set_test.cpp @@ -9,7 +9,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include #include #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -151,8 +150,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -187,8 +185,7 @@ class test_main_template >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -204,8 +201,7 @@ class test_main_template >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::auto_member_hook_type , &value_type::auto_node_ > @@ -274,4 +270,3 @@ int main() return boost::report_errors(); } -#include diff --git a/test/treap_multiset_test.cpp b/test/treap_multiset_test.cpp index bb2b36d..ef7481d 100644 --- a/test/treap_multiset_test.cpp +++ b/test/treap_multiset_test.cpp @@ -10,8 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// - -#include #include #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -120,8 +118,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -156,8 +153,7 @@ class test_main_template >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -173,8 +169,7 @@ class test_main_template >::test_all(); test::test_generic_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::auto_member_hook_type , &value_type::auto_node_ > @@ -242,5 +237,3 @@ int main() return boost::report_errors(); } - -#include diff --git a/test/treap_set_test.cpp b/test/treap_set_test.cpp index da80eed..727c569 100644 --- a/test/treap_set_test.cpp +++ b/test/treap_set_test.cpp @@ -9,7 +9,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include #include #include "itestvalue.hpp" #include "bptr_value.hpp" @@ -135,8 +134,7 @@ class test_main_template , GetContainer_With_Holder< Default_Holder >::template GetContainer >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -171,8 +169,7 @@ class test_main_template >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -188,8 +185,7 @@ class test_main_template >::test_all(); test::test_generic_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::auto_member_hook_type , &value_type::auto_node_ > @@ -258,5 +254,3 @@ int main() return boost::report_errors(); } - -#include diff --git a/test/unordered_multiset_test.cpp b/test/unordered_multiset_test.cpp index a4f6d0c..7144603 100644 --- a/test/unordered_multiset_test.cpp +++ b/test/unordered_multiset_test.cpp @@ -10,7 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include #include #include #include "itestvalue.hpp" @@ -780,8 +779,7 @@ class test_main_template >::test_all(data); test_unordered_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -825,8 +823,7 @@ class test_main_template >::test_all(data); test_unordered_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -846,8 +843,7 @@ class test_main_template >::test_all(data); test_unordered_multiset < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::auto_member_hook_type , &value_type::auto_node_ > @@ -872,5 +868,3 @@ int main() test_main_template, true, false>()(); return boost::report_errors(); } - -#include diff --git a/test/unordered_set_test.cpp b/test/unordered_set_test.cpp index 1397364..271344f 100644 --- a/test/unordered_set_test.cpp +++ b/test/unordered_set_test.cpp @@ -10,7 +10,6 @@ // See http://www.boost.org/libs/intrusive for documentation. // ///////////////////////////////////////////////////////////////////////////// -#include #include #include #include "itestvalue.hpp" @@ -632,8 +631,7 @@ class test_main_template , incremental >::test_all(data); test_unordered_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -678,8 +676,7 @@ class test_main_template >::test_all(data); test_unordered_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::member_hook_type , &value_type::node_ > @@ -699,8 +696,7 @@ class test_main_template >::test_all(data); test_unordered_set < typename detail::get_member_value_traits - < value_type - , member_hook< value_type + < member_hook< value_type , typename hooks::auto_member_hook_type , &value_type::auto_node_ > @@ -725,4 +721,3 @@ int main() test_main_template, true, false>()(); return boost::report_errors(); } -#include