diff options
Diffstat (limited to 'boost/intrusive/rbtree.hpp')
-rw-r--r-- | boost/intrusive/rbtree.hpp | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/boost/intrusive/rbtree.hpp b/boost/intrusive/rbtree.hpp index d6e692ef95..4ef50b4c4f 100644 --- a/boost/intrusive/rbtree.hpp +++ b/boost/intrusive/rbtree.hpp @@ -12,15 +12,11 @@ #ifndef BOOST_INTRUSIVE_RBTREE_HPP #define BOOST_INTRUSIVE_RBTREE_HPP -#if defined(_MSC_VER) -# pragma once -#endif - #include <boost/intrusive/detail/config_begin.hpp> #include <boost/intrusive/intrusive_fwd.hpp> #include <cstddef> -#include <functional> -#include <utility> +#include <boost/intrusive/detail/minimal_less_equal_header.hpp> +#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair #include <boost/intrusive/set_hook.hpp> #include <boost/intrusive/detail/rbtree_node.hpp> @@ -35,6 +31,10 @@ #include <boost/move/utility_core.hpp> #include <boost/static_assert.hpp> +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + namespace boost { namespace intrusive { @@ -86,7 +86,7 @@ class rbtree_impl /// @cond typedef bstree_impl< ValueTraits, VoidOrKeyComp, SizeType , ConstantTimeSize, RbTreeAlgorithms - , HeaderHolder> tree_type; + , HeaderHolder> tree_type; typedef tree_type implementation_defined; /// @endcond @@ -139,12 +139,12 @@ class rbtree_impl //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&) rbtree_impl(BOOST_RV_REF(rbtree_impl) x) - : tree_type(::boost::move(static_cast<tree_type&>(x))) + : tree_type(BOOST_MOVE_BASE(tree_type, x)) {} //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&) rbtree_impl& operator=(BOOST_RV_REF(rbtree_impl) x) - { return static_cast<rbtree_impl&>(tree_type::operator=(::boost::move(static_cast<tree_type&>(x)))); } + { return static_cast<rbtree_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); } #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED //! @copydoc ::boost::intrusive::bstree::~bstree() @@ -213,10 +213,14 @@ class rbtree_impl //! @copydoc ::boost::intrusive::bstree::swap void swap(rbtree_impl& other); - //! @copydoc ::boost::intrusive::bstree::clone_from + //! @copydoc ::boost::intrusive::bstree::clone_from(const bstree &src, cloner, Disposer) template <class Cloner, class Disposer> void clone_from(const rbtree_impl &src, Cloner cloner, Disposer disposer); + //! @copydoc ::boost::intrusive::bstree::clone_from(bstree &src, cloner, Disposer) + template <class Cloner, class Disposer> + void clone_from(rbtree_impl &src, Cloner cloner, Disposer disposer); + //! @copydoc ::boost::intrusive::bstree::insert_equal(reference) iterator insert_equal(reference value); @@ -305,7 +309,7 @@ class rbtree_impl //! @copydoc ::boost::intrusive::bstree::lower_bound(const_reference) iterator lower_bound(const_reference value); - + //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyValueCompare) template<class KeyType, class KeyValueCompare> iterator lower_bound(const KeyType& key, KeyValueCompare comp); @@ -453,15 +457,13 @@ struct make_rbtree typedef typename detail::get_value_traits <T, typename packed_options::proto_value_traits>::type value_traits; - typedef typename detail::get_header_holder_type - < value_traits, typename packed_options::header_holder_type >::type header_holder_type; typedef rbtree_impl < value_traits , typename packed_options::compare , typename packed_options::size_type , packed_options::constant_time_size - , header_holder_type + , typename packed_options::header_holder_type > implementation_defined; /// @endcond typedef implementation_defined type; @@ -518,11 +520,11 @@ class rbtree {} rbtree(BOOST_RV_REF(rbtree) x) - : Base(::boost::move(static_cast<Base&>(x))) + : Base(BOOST_MOVE_BASE(Base, x)) {} rbtree& operator=(BOOST_RV_REF(rbtree) x) - { return static_cast<rbtree &>(this->Base::operator=(::boost::move(static_cast<Base&>(x)))); } + { return static_cast<rbtree &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); } static rbtree &container_from_end_iterator(iterator end_iterator) { return static_cast<rbtree &>(Base::container_from_end_iterator(end_iterator)); } |