diff options
Diffstat (limited to 'boost/intrusive/set_hook.hpp')
-rw-r--r-- | boost/intrusive/set_hook.hpp | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/boost/intrusive/set_hook.hpp b/boost/intrusive/set_hook.hpp index 2634b42eef..ce984a305e 100644 --- a/boost/intrusive/set_hook.hpp +++ b/boost/intrusive/set_hook.hpp @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////// // // (C) Copyright Olaf Krzikalla 2004-2006. -// (C) Copyright Ion Gaztanaga 2006-2012 +// (C) Copyright Ion Gaztanaga 2006-2013 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at @@ -14,9 +14,13 @@ #ifndef BOOST_INTRUSIVE_SET_HOOK_HPP #define BOOST_INTRUSIVE_SET_HOOK_HPP +#if defined(_MSC_VER) +# pragma once +#endif + #include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/intrusive_fwd.hpp> -#include <boost/intrusive/detail/utilities.hpp> + #include <boost/intrusive/detail/rbtree_node.hpp> #include <boost/intrusive/rbtree_algorithms.hpp> #include <boost/intrusive/options.hpp> @@ -25,20 +29,12 @@ namespace boost { namespace intrusive { -/// @cond -template<class VoidPointer, bool OptimizeSize = false> -struct get_set_node_algo -{ - typedef rbtree_algorithms<rbtree_node_traits<VoidPointer, OptimizeSize> > type; -}; -/// @endcond - //! Helper metafunction to define a \c set_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) template<class ...Options> #else -template<class O1 = none, class O2 = none, class O3 = none, class O4 = none> +template<class O1 = void, class O2 = void, class O3 = void, class O4 = void> #endif struct make_set_base_hook { @@ -52,12 +48,11 @@ struct make_set_base_hook #endif >::type packed_options; - typedef detail::generic_hook - < get_set_node_algo<typename packed_options::void_pointer - ,packed_options::optimize_size> + typedef generic_hook + < rbtree_algorithms<rbtree_node_traits<typename packed_options::void_pointer, packed_options::optimize_size> > , typename packed_options::tag , packed_options::link_mode - , detail::SetBaseHook + , RbTreeBaseHookId > implementation_defined; /// @endcond typedef implementation_defined type; @@ -76,7 +71,7 @@ struct make_set_base_hook //! unique tag. //! //! \c void_pointer<> is the pointer type that will be used internally in the hook -//! and the the container configured to use this hook. +//! and the container configured to use this hook. //! //! \c link_mode<> will specify the linking mode of the hook (\c normal_link, //! \c auto_unlink or \c safe_link). @@ -170,7 +165,7 @@ class set_base_hook #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) template<class ...Options> #else -template<class O1 = none, class O2 = none, class O3 = none, class O4 = none> +template<class O1 = void, class O2 = void, class O3 = void, class O4 = void> #endif struct make_set_member_hook { @@ -184,12 +179,11 @@ struct make_set_member_hook #endif >::type packed_options; - typedef detail::generic_hook - < get_set_node_algo<typename packed_options::void_pointer - ,packed_options::optimize_size> + typedef generic_hook + < rbtree_algorithms<rbtree_node_traits<typename packed_options::void_pointer, packed_options::optimize_size> > , member_tag , packed_options::link_mode - , detail::NoBaseHook + , NoBaseHookId > implementation_defined; /// @endcond typedef implementation_defined type; @@ -203,7 +197,7 @@ struct make_set_member_hook //! \c link_mode<> and \c optimize_size<>. //! //! \c void_pointer<> is the pointer type that will be used internally in the hook -//! and the the container configured to use this hook. +//! and the container configured to use this hook. //! //! \c link_mode<> will specify the linking mode of the hook (\c normal_link, //! \c auto_unlink or \c safe_link). |