summaryrefslogtreecommitdiff
path: root/boost/intrusive/treap_set.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/intrusive/treap_set.hpp')
-rw-r--r--boost/intrusive/treap_set.hpp42
1 files changed, 19 insertions, 23 deletions
diff --git a/boost/intrusive/treap_set.hpp b/boost/intrusive/treap_set.hpp
index ef68b0595e..a88df58e44 100644
--- a/boost/intrusive/treap_set.hpp
+++ b/boost/intrusive/treap_set.hpp
@@ -12,10 +12,6 @@
#ifndef BOOST_INTRUSIVE_TREAP_SET_HPP
#define BOOST_INTRUSIVE_TREAP_SET_HPP
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
#include <boost/intrusive/detail/config_begin.hpp>
#include <boost/intrusive/intrusive_fwd.hpp>
#include <boost/intrusive/treap.hpp>
@@ -23,6 +19,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 {
@@ -101,7 +101,7 @@ class treap_set_impl
//! [b, e).
//!
//! <b>Complexity</b>: Linear in N if [b, e) is already sorted using
- //! comp and otherwise N * log N, where N is std::distance(last, first).
+ //! comp and otherwise N * log N, where N is distance(last, first).
//!
//! <b>Throws</b>: If value_traits::node_traits::node
//! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
@@ -117,13 +117,13 @@ class treap_set_impl
//! <b>Effects</b>: to-do
//!
treap_set_impl(BOOST_RV_REF(treap_set_impl) x)
- : tree_type(::boost::move(static_cast<tree_type&>(x)))
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
{}
//! <b>Effects</b>: to-do
//!
treap_set_impl& operator=(BOOST_RV_REF(treap_set_impl) x)
- { return static_cast<treap_set_impl&>(tree_type::operator=(::boost::move(static_cast<tree_type&>(x)))); }
+ { return static_cast<treap_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! @copydoc ::boost::intrusive::treap::~treap()
@@ -311,7 +311,7 @@ class treap_set_impl
//! @copydoc ::boost::intrusive::treap::lower_bound(const_reference)
iterator lower_bound(const_reference value);
-
+
//! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyValueCompare)
template<class KeyType, class KeyValueCompare>
iterator lower_bound(const KeyType& key, KeyValueCompare comp);
@@ -443,8 +443,6 @@ struct make_treap_set
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 treap_set_impl
< value_traits
@@ -452,7 +450,7 @@ struct make_treap_set
, typename packed_options::priority
, 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;
@@ -509,11 +507,11 @@ class treap_set
{}
treap_set(BOOST_RV_REF(treap_set) x)
- : Base(::boost::move(static_cast<Base&>(x)))
+ : Base(BOOST_MOVE_BASE(Base, x))
{}
treap_set& operator=(BOOST_RV_REF(treap_set) x)
- { return static_cast<treap_set &>(this->Base::operator=(::boost::move(static_cast<Base&>(x)))); }
+ { return static_cast<treap_set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
static treap_set &container_from_end_iterator(iterator end_iterator)
{ return static_cast<treap_set &>(Base::container_from_end_iterator(end_iterator)); }
@@ -604,7 +602,7 @@ class treap_multiset_impl
//! [b, e).
//!
//! <b>Complexity</b>: Linear in N if [b, e) is already sorted using
- //! comp and otherwise N * log N, where N is std::distance(last, first).
+ //! comp and otherwise N * log N, where N is distance(last, first).
//!
//! <b>Throws</b>: If value_traits::node_traits::node
//! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
@@ -620,13 +618,13 @@ class treap_multiset_impl
//! <b>Effects</b>: to-do
//!
treap_multiset_impl(BOOST_RV_REF(treap_multiset_impl) x)
- : tree_type(::boost::move(static_cast<tree_type&>(x)))
+ : tree_type(BOOST_MOVE_BASE(tree_type, x))
{}
//! <b>Effects</b>: to-do
//!
treap_multiset_impl& operator=(BOOST_RV_REF(treap_multiset_impl) x)
- { return static_cast<treap_multiset_impl&>(tree_type::operator=(::boost::move(static_cast<tree_type&>(x)))); }
+ { return static_cast<treap_multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! @copydoc ::boost::intrusive::treap::~treap()
@@ -786,10 +784,10 @@ class treap_multiset_impl
//! @copydoc ::boost::intrusive::treap::count(const KeyType&,KeyValueCompare)const
template<class KeyType, class KeyValueCompare>
size_type count(const KeyType& key, KeyValueCompare comp) const;
-
+
//! @copydoc ::boost::intrusive::treap::lower_bound(const_reference)
iterator lower_bound(const_reference value);
-
+
//! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyValueCompare)
template<class KeyType, class KeyValueCompare>
iterator lower_bound(const KeyType& key, KeyValueCompare comp);
@@ -913,8 +911,6 @@ struct make_treap_multiset
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 treap_multiset_impl
< value_traits
@@ -922,7 +918,7 @@ struct make_treap_multiset
, typename packed_options::priority
, 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;
@@ -979,11 +975,11 @@ class treap_multiset
{}
treap_multiset(BOOST_RV_REF(treap_multiset) x)
- : Base(::boost::move(static_cast<Base&>(x)))
+ : Base(BOOST_MOVE_BASE(Base, x))
{}
treap_multiset& operator=(BOOST_RV_REF(treap_multiset) x)
- { return static_cast<treap_multiset &>(this->Base::operator=(::boost::move(static_cast<Base&>(x)))); }
+ { return static_cast<treap_multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
static treap_multiset &container_from_end_iterator(iterator end_iterator)
{ return static_cast<treap_multiset &>(Base::container_from_end_iterator(end_iterator)); }