update boost
This commit is contained in:
@@ -194,7 +194,7 @@ class any_member_hook
|
||||
//! initializes the node to an unlinked state.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
any_member_hook();
|
||||
any_member_hook() BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: If link_mode is or \c safe_link
|
||||
//! initializes the node to an unlinked state. The argument is ignored.
|
||||
@@ -205,7 +205,7 @@ class any_member_hook
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
any_member_hook(const any_member_hook& );
|
||||
any_member_hook(const any_member_hook&) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Empty function. The argument is ignored.
|
||||
//!
|
||||
@@ -215,7 +215,7 @@ class any_member_hook
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
any_member_hook& operator=(const any_member_hook& );
|
||||
any_member_hook& operator=(const any_member_hook&) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c normal_link, the destructor does
|
||||
//! nothing (ie. no code is generated). If link_mode is \c safe_link and the
|
||||
@@ -231,7 +231,7 @@ class any_member_hook
|
||||
//! will return a valid iterator.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
bool is_linked() const;
|
||||
bool is_linked() const BOOST_NOEXCEPT;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -120,22 +120,22 @@ class avl_set_impl
|
||||
~avl_set_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::begin()
|
||||
reverse_iterator avlegin();
|
||||
@@ -144,37 +144,37 @@ class avl_set_impl
|
||||
const_reverse_iterator avlegin() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(iterator)
|
||||
static avl_set_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static avl_set_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(const_iterator)
|
||||
static const avl_set_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const avl_set_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::container_from_iterator(iterator)
|
||||
static avl_set_impl &container_from_iterator(iterator it);
|
||||
static avl_set_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::container_from_iterator(const_iterator)
|
||||
static const avl_set_impl &container_from_iterator(const_iterator it);
|
||||
static const avl_set_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -183,10 +183,10 @@ class avl_set_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::swap
|
||||
void swap(avl_set_impl& other);
|
||||
@@ -244,24 +244,24 @@ class avl_set_impl
|
||||
{ tree_type::insert_unique(b, e); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::insert_unique_commit
|
||||
iterator insert_commit(reference value, const insert_commit_data &commit_data)
|
||||
iterator insert_commit(reference value, const insert_commit_data &commit_data) BOOST_NOEXCEPT
|
||||
{ return tree_type::insert_unique_commit(value, commit_data); }
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::avltree::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value);
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::push_back
|
||||
void push_back(reference value);
|
||||
void push_back(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::push_front
|
||||
void push_front(reference value);
|
||||
void push_front(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::erase(const_iterator)
|
||||
iterator erase(const_iterator i);
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e);
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::erase(const key_type &key)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -272,11 +272,11 @@ class avl_set_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const key_type &, Disposer)
|
||||
template<class Disposer>
|
||||
@@ -287,11 +287,11 @@ class avl_set_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
#endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
@@ -391,28 +391,28 @@ class avl_set_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::merge_unique
|
||||
template<class ...Options2>
|
||||
@@ -555,16 +555,16 @@ class avl_set
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(avl_set) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static avl_set &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static avl_set &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<avl_set &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const avl_set &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const avl_set &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const avl_set &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static avl_set &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static avl_set &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<avl_set &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const avl_set &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const avl_set &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const avl_set &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
@@ -657,61 +657,61 @@ class avl_multiset_impl
|
||||
~avl_multiset_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(iterator)
|
||||
static avl_multiset_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static avl_multiset_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(const_iterator)
|
||||
static const avl_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const avl_multiset_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::container_from_iterator(iterator)
|
||||
static avl_multiset_impl &container_from_iterator(iterator it);
|
||||
static avl_multiset_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::container_from_iterator(const_iterator)
|
||||
static const avl_multiset_impl &container_from_iterator(const_iterator it);
|
||||
static const avl_multiset_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -720,10 +720,10 @@ class avl_multiset_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::swap
|
||||
void swap(avl_multiset_impl& other);
|
||||
@@ -758,19 +758,19 @@ class avl_multiset_impl
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::avltree::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value);
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::push_back
|
||||
void push_back(reference value);
|
||||
void push_back(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::push_front
|
||||
void push_front(reference value);
|
||||
void push_front(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::erase(const_iterator)
|
||||
iterator erase(const_iterator i);
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e);
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::erase(const key_type &)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -781,11 +781,11 @@ class avl_multiset_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const key_type &, Disposer)
|
||||
template<class Disposer>
|
||||
@@ -796,11 +796,11 @@ class avl_multiset_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::count(const key_type &)const
|
||||
size_type count(const key_type &key) const;
|
||||
@@ -886,28 +886,28 @@ class avl_multiset_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::avltree::merge_equal
|
||||
template<class ...Options2>
|
||||
@@ -1050,16 +1050,16 @@ class avl_multiset
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(avl_multiset) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static avl_multiset &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static avl_multiset &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<avl_multiset &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const avl_multiset &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const avl_multiset &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const avl_multiset &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static avl_multiset &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static avl_multiset &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<avl_multiset &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const avl_multiset &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const avl_multiset &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const avl_multiset &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -154,61 +154,61 @@ class avltree_impl
|
||||
~avltree_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
|
||||
static avltree_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static avltree_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
|
||||
static const avltree_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const avltree_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
|
||||
static avltree_impl &container_from_iterator(iterator it);
|
||||
static avltree_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
|
||||
static const avltree_impl &container_from_iterator(const_iterator it);
|
||||
static const avltree_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -217,10 +217,10 @@ class avltree_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::swap
|
||||
void swap(avltree_impl& other);
|
||||
@@ -278,26 +278,26 @@ class avltree_impl
|
||||
(const_iterator hint, const key_type &key, insert_commit_data &commit_data);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::insert_unique_commit
|
||||
iterator insert_unique_commit(reference value, const insert_commit_data &commit_data);
|
||||
iterator insert_unique_commit(reference value, const insert_commit_data &commit_data) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::insert_unique(Iterator,Iterator)
|
||||
template<class Iterator>
|
||||
void insert_unique(Iterator b, Iterator e);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value);
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::push_back
|
||||
void push_back(reference value);
|
||||
void push_back(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::push_front
|
||||
void push_front(reference value);
|
||||
void push_front(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
|
||||
iterator erase(const_iterator i);
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e);
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -308,11 +308,11 @@ class avltree_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
|
||||
template<class Disposer>
|
||||
@@ -323,11 +323,11 @@ class avltree_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::count(const key_type &ke)const
|
||||
size_type count(const key_type &key) const;
|
||||
@@ -413,28 +413,28 @@ class avltree_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::merge_unique(bstree<T, Options2...>&)
|
||||
template<class T, class ...Options2>
|
||||
@@ -565,16 +565,16 @@ class avltree
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(avltree) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static avltree &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static avltree &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<avltree &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const avltree &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const avltree &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const avltree &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static avltree &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static avltree &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<avltree &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const avltree &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const avltree &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const avltree &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -46,14 +46,14 @@ struct avltree_node_cloner
|
||||
: base_t(f)
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr operator()(const node_ptr & p)
|
||||
node_ptr operator()(node_ptr p)
|
||||
{
|
||||
node_ptr n = base_t::get()(p);
|
||||
NodeTraits::set_balance(n, NodeTraits::get_balance(p));
|
||||
return n;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr operator()(const node_ptr & p) const
|
||||
node_ptr operator()(node_ptr p) const
|
||||
{
|
||||
node_ptr n = base_t::get()(p);
|
||||
NodeTraits::set_balance(n, NodeTraits::get_balance(p));
|
||||
@@ -83,7 +83,7 @@ struct avltree_node_checker
|
||||
: base_checker_t(comp, extra_checker)
|
||||
{}
|
||||
|
||||
void operator () (const const_node_ptr& p,
|
||||
void operator () (const_node_ptr p,
|
||||
const return_type& check_return_left, const return_type& check_return_right,
|
||||
return_type& check_return)
|
||||
{
|
||||
@@ -166,22 +166,22 @@ class avltree_algorithms
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
|
||||
static node_ptr get_header(const const_node_ptr & n);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const_node_ptr)
|
||||
static node_ptr get_header(const_node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
|
||||
static node_ptr begin_node(const const_node_ptr & header);
|
||||
static node_ptr begin_node(const_node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::end_node
|
||||
static node_ptr end_node(const const_node_ptr & header);
|
||||
static node_ptr end_node(const_node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
|
||||
static void swap_tree(node_ptr header1, node_ptr header2);
|
||||
static void swap_tree(node_ptr header1, node_ptr header2) BOOST_NOEXCEPT;
|
||||
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr)
|
||||
static void swap_nodes(node_ptr node1, node_ptr node2)
|
||||
static void swap_nodes(node_ptr node1, node_ptr node2) BOOST_NOEXCEPT
|
||||
{
|
||||
if(node1 == node2)
|
||||
return;
|
||||
@@ -191,7 +191,7 @@ class avltree_algorithms
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr,node_ptr,node_ptr)
|
||||
static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2)
|
||||
static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2) BOOST_NOEXCEPT
|
||||
{
|
||||
if(node1 == node2) return;
|
||||
|
||||
@@ -203,7 +203,7 @@ class avltree_algorithms
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr)
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node)
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node) BOOST_NOEXCEPT
|
||||
{
|
||||
if(node_to_be_replaced == new_node)
|
||||
return;
|
||||
@@ -211,44 +211,44 @@ class avltree_algorithms
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr,node_ptr)
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node)
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::replace_node(node_to_be_replaced, header, new_node);
|
||||
NodeTraits::set_balance(new_node, NodeTraits::get_balance(node_to_be_replaced));
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unlink(node_ptr)
|
||||
static void unlink(node_ptr node)
|
||||
static void unlink(node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr x = NodeTraits::get_parent(node);
|
||||
node_ptr x = NodeTraits::get_parent(n);
|
||||
if(x){
|
||||
while(!is_header(x))
|
||||
x = NodeTraits::get_parent(x);
|
||||
erase(x, node);
|
||||
erase(x, n);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
|
||||
static node_ptr unlink_leftmost_without_rebalance(const node_ptr & header);
|
||||
static node_ptr unlink_leftmost_without_rebalance(node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
|
||||
static bool unique(const const_node_ptr & node);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const_node_ptr)
|
||||
static bool unique(const_node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
|
||||
static std::size_t size(const const_node_ptr & header);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::size(const_node_ptr)
|
||||
static std::size_t size(const_node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
|
||||
static node_ptr next_node(const node_ptr & node);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::next_node(node_ptr)
|
||||
static node_ptr next_node(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
|
||||
static node_ptr prev_node(const node_ptr & node);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(node_ptr)
|
||||
static node_ptr prev_node(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::init(node_ptr)
|
||||
static void init(const node_ptr & node);
|
||||
static void init(node_ptr n) BOOST_NOEXCEPT;
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! <b>Requires</b>: node must not be part of any tree.
|
||||
//! <b>Requires</b>: header must not be part of any tree.
|
||||
//!
|
||||
//! <b>Effects</b>: Initializes the header to represent an empty tree.
|
||||
//! unique(header) == true.
|
||||
@@ -257,15 +257,15 @@ class avltree_algorithms
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
|
||||
static void init_header(node_ptr header)
|
||||
//! <b>Nodes</b>: If header is inserted in a tree, this function corrupts the tree.
|
||||
static void init_header(node_ptr header) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::init_header(header);
|
||||
NodeTraits::set_balance(header, NodeTraits::zero());
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::erase(node_ptr,node_ptr)
|
||||
static node_ptr erase(node_ptr header, node_ptr z)
|
||||
static node_ptr erase(node_ptr header, node_ptr z) BOOST_NOEXCEPT
|
||||
{
|
||||
typename bstree_algo::data_for_rebalance info;
|
||||
bstree_algo::erase(header, z, info);
|
||||
@@ -298,49 +298,49 @@ class avltree_algorithms
|
||||
rebalance_after_insertion(header1, z);
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,node_ptr,Cloner,Disposer)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clone(const_node_ptr,node_ptr,Cloner,Disposer)
|
||||
template <class Cloner, class Disposer>
|
||||
static void clone
|
||||
(const const_node_ptr & source_header, node_ptr target_header, Cloner cloner, Disposer disposer)
|
||||
(const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer)
|
||||
{
|
||||
avltree_node_cloner<NodeTraits, Cloner> new_cloner(cloner);
|
||||
bstree_algo::clone(source_header, target_header, new_cloner, disposer);
|
||||
}
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(node_ptr,Disposer)
|
||||
template<class Disposer>
|
||||
static void clear_and_dispose(const node_ptr & header, Disposer disposer);
|
||||
static void clear_and_dispose(node_ptr header, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr lower_bound
|
||||
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr upper_bound
|
||||
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::find(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr find
|
||||
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> equal_range
|
||||
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const_node_ptr,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> bounded_range
|
||||
(const const_node_ptr & header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
|
||||
(const_node_ptr header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
|
||||
, bool left_closed, bool right_closed);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::count(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::size_t count(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
static std::size_t count(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
@@ -376,7 +376,7 @@ class avltree_algorithms
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_before(node_ptr,node_ptr,node_ptr)
|
||||
static node_ptr insert_before
|
||||
(node_ptr header, node_ptr pos, node_ptr new_node)
|
||||
(node_ptr header, node_ptr pos, node_ptr new_node) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::insert_before(header, pos, new_node);
|
||||
rebalance_after_insertion(header, new_node);
|
||||
@@ -384,48 +384,48 @@ class avltree_algorithms
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::push_back(node_ptr,node_ptr)
|
||||
static void push_back(node_ptr header, node_ptr new_node)
|
||||
static void push_back(node_ptr header, node_ptr new_node) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::push_back(header, new_node);
|
||||
rebalance_after_insertion(header, new_node);
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::push_front(node_ptr,node_ptr)
|
||||
static void push_front(node_ptr header, node_ptr new_node)
|
||||
static void push_front(node_ptr header, node_ptr new_node) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::push_front(header, new_node);
|
||||
rebalance_after_insertion(header, new_node);
|
||||
}
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const_node_ptr,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, bool> insert_unique_check
|
||||
(const const_node_ptr & header, const KeyType &key
|
||||
(const_node_ptr header, const KeyType &key
|
||||
,KeyNodePtrCompare comp, insert_commit_data &commit_data);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const_node_ptr,node_ptr,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, bool> insert_unique_check
|
||||
(const const_node_ptr & header, const node_ptr &hint, const KeyType &key
|
||||
(const_node_ptr header, node_ptr hint, const KeyType &key
|
||||
,KeyNodePtrCompare comp, insert_commit_data &commit_data);
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_commit(node_ptr,node_ptr,const insert_commit_data &)
|
||||
static void insert_unique_commit
|
||||
(node_ptr header, node_ptr new_value, const insert_commit_data &commit_data)
|
||||
(node_ptr header, node_ptr new_value, const insert_commit_data &commit_data) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::insert_unique_commit(header, new_value, commit_data);
|
||||
rebalance_after_insertion(header, new_value);
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::is_header
|
||||
static bool is_header(const const_node_ptr & p)
|
||||
static bool is_header(const_node_ptr p) BOOST_NOEXCEPT
|
||||
{ return NodeTraits::get_balance(p) == NodeTraits::zero() && bstree_algo::is_header(p); }
|
||||
|
||||
|
||||
/// @cond
|
||||
static bool verify(const node_ptr &header)
|
||||
static bool verify(node_ptr header)
|
||||
{
|
||||
std::size_t height;
|
||||
std::size_t count;
|
||||
@@ -483,7 +483,7 @@ class avltree_algorithms
|
||||
}
|
||||
|
||||
static void rebalance_after_erasure
|
||||
( node_ptr header, node_ptr z, const typename bstree_algo::data_for_rebalance &info)
|
||||
( node_ptr header, node_ptr z, const typename bstree_algo::data_for_rebalance &info) BOOST_NOEXCEPT
|
||||
{
|
||||
if(info.y != z){
|
||||
NodeTraits::set_balance(info.y, NodeTraits::get_balance(z));
|
||||
@@ -492,7 +492,7 @@ class avltree_algorithms
|
||||
rebalance_after_erasure_restore_invariants(header, info.x, info.x_parent);
|
||||
}
|
||||
|
||||
static void rebalance_after_erasure_restore_invariants(node_ptr header, node_ptr x, node_ptr x_parent)
|
||||
static void rebalance_after_erasure_restore_invariants(node_ptr header, node_ptr x, node_ptr x_parent) BOOST_NOEXCEPT
|
||||
{
|
||||
for ( node_ptr root = NodeTraits::get_parent(header)
|
||||
; x != root
|
||||
@@ -560,7 +560,7 @@ class avltree_algorithms
|
||||
}
|
||||
}
|
||||
|
||||
static void rebalance_after_insertion(node_ptr header, node_ptr x)
|
||||
static void rebalance_after_insertion(node_ptr header, node_ptr x) BOOST_NOEXCEPT
|
||||
{
|
||||
NodeTraits::set_balance(x, NodeTraits::zero());
|
||||
// Rebalance.
|
||||
@@ -605,7 +605,7 @@ class avltree_algorithms
|
||||
}
|
||||
}
|
||||
|
||||
static void left_right_balancing(node_ptr a, node_ptr b, node_ptr c)
|
||||
static void left_right_balancing(node_ptr a, node_ptr b, node_ptr c) BOOST_NOEXCEPT
|
||||
{
|
||||
// balancing...
|
||||
const balance c_balance = NodeTraits::get_balance(c);
|
||||
@@ -630,7 +630,7 @@ class avltree_algorithms
|
||||
}
|
||||
}
|
||||
|
||||
static node_ptr avl_rotate_left_right(const node_ptr a, const node_ptr a_oldleft, node_ptr hdr)
|
||||
static node_ptr avl_rotate_left_right(const node_ptr a, const node_ptr a_oldleft, node_ptr hdr) BOOST_NOEXCEPT
|
||||
{ // [note: 'a_oldleft' is 'b']
|
||||
// | | //
|
||||
// a(-2) c //
|
||||
@@ -650,7 +650,7 @@ class avltree_algorithms
|
||||
return c;
|
||||
}
|
||||
|
||||
static node_ptr avl_rotate_right_left(const node_ptr a, const node_ptr a_oldright, node_ptr hdr)
|
||||
static node_ptr avl_rotate_right_left(const node_ptr a, const node_ptr a_oldright, node_ptr hdr) BOOST_NOEXCEPT
|
||||
{ // [note: 'a_oldright' is 'b']
|
||||
// | | //
|
||||
// a(pos) c //
|
||||
@@ -670,7 +670,7 @@ class avltree_algorithms
|
||||
return c;
|
||||
}
|
||||
|
||||
static void avl_rotate_left(node_ptr x, node_ptr x_oldright, node_ptr hdr)
|
||||
static void avl_rotate_left(node_ptr x, node_ptr x_oldright, node_ptr hdr) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::rotate_left(x, x_oldright, NodeTraits::get_parent(x), hdr);
|
||||
|
||||
@@ -685,7 +685,7 @@ class avltree_algorithms
|
||||
}
|
||||
}
|
||||
|
||||
static void avl_rotate_right(node_ptr x, node_ptr x_oldleft, node_ptr hdr)
|
||||
static void avl_rotate_right(node_ptr x, node_ptr x_oldleft, node_ptr hdr) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::rotate_right(x, x_oldleft, NodeTraits::get_parent(x), hdr);
|
||||
|
||||
|
||||
@@ -117,61 +117,61 @@ class bs_set_impl
|
||||
~bs_set_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
|
||||
static bs_set_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static bs_set_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
|
||||
static const bs_set_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const bs_set_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
|
||||
static bs_set_impl &container_from_iterator(iterator it);
|
||||
static bs_set_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
|
||||
static const bs_set_impl &container_from_iterator(const_iterator it);
|
||||
static const bs_set_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -180,10 +180,10 @@ class bs_set_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::swap
|
||||
void swap(bs_set_impl& other);
|
||||
@@ -241,24 +241,24 @@ class bs_set_impl
|
||||
{ tree_type::insert_unique(b, e); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::insert_unique_commit
|
||||
iterator insert_commit(reference value, const insert_commit_data &commit_data)
|
||||
iterator insert_commit(reference value, const insert_commit_data &commit_data) BOOST_NOEXCEPT
|
||||
{ return tree_type::insert_unique_commit(value, commit_data); }
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value);
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::push_back
|
||||
void push_back(reference value);
|
||||
void push_back(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::push_front
|
||||
void push_front(reference value);
|
||||
void push_front(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
|
||||
iterator erase(const_iterator i);
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e);
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -269,11 +269,11 @@ class bs_set_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
|
||||
template<class Disposer>
|
||||
@@ -284,11 +284,11 @@ class bs_set_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
#endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
@@ -388,28 +388,28 @@ class bs_set_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::merge_unique
|
||||
template<class ...Options2>
|
||||
@@ -552,16 +552,16 @@ class bs_set
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(bs_set) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bs_set &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bs_set &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<bs_set &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const bs_set &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const bs_set &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const bs_set &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bs_set &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bs_set &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<bs_set &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const bs_set &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const bs_set &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const bs_set &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
@@ -653,61 +653,61 @@ class bs_multiset_impl
|
||||
~bs_multiset_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
|
||||
static bs_multiset_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static bs_multiset_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
|
||||
static const bs_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const bs_multiset_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
|
||||
static bs_multiset_impl &container_from_iterator(iterator it);
|
||||
static bs_multiset_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
|
||||
static const bs_multiset_impl &container_from_iterator(const_iterator it);
|
||||
static const bs_multiset_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -716,10 +716,10 @@ class bs_multiset_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::swap
|
||||
void swap(bs_multiset_impl& other);
|
||||
@@ -754,19 +754,19 @@ class bs_multiset_impl
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value);
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::push_back
|
||||
void push_back(reference value);
|
||||
void push_back(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::push_front
|
||||
void push_front(reference value);
|
||||
void push_front(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
|
||||
iterator erase(const_iterator i);
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e);
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -777,11 +777,11 @@ class bs_multiset_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
|
||||
template<class Disposer>
|
||||
@@ -792,11 +792,11 @@ class bs_multiset_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
|
||||
size_type count(const key_type &key) const;
|
||||
@@ -882,28 +882,28 @@ class bs_multiset_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::merge_equal
|
||||
template<class ...Options2>
|
||||
@@ -1046,16 +1046,16 @@ class bs_multiset
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(bs_multiset) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bs_multiset &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bs_multiset &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<bs_multiset &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const bs_multiset &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const bs_multiset &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const bs_multiset &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bs_multiset &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bs_multiset &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<bs_multiset &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const bs_multiset &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const bs_multiset &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const bs_multiset &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -145,22 +145,22 @@ struct bstbase3
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr priv_value_traits_ptr() const
|
||||
{ return pointer_traits<const_value_traits_ptr>::pointer_to(this->get_value_traits()); }
|
||||
|
||||
iterator begin()
|
||||
BOOST_INTRUSIVE_FORCEINLINE iterator begin() BOOST_NOEXCEPT
|
||||
{ return iterator(node_algorithms::begin_node(this->header_ptr()), this->priv_value_traits_ptr()); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator begin() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT
|
||||
{ return cbegin(); }
|
||||
|
||||
const_iterator cbegin() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT
|
||||
{ return const_iterator(node_algorithms::begin_node(this->header_ptr()), this->priv_value_traits_ptr()); }
|
||||
|
||||
iterator end()
|
||||
BOOST_INTRUSIVE_FORCEINLINE iterator end() BOOST_NOEXCEPT
|
||||
{ return iterator(node_algorithms::end_node(this->header_ptr()), this->priv_value_traits_ptr()); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator end() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT
|
||||
{ return cend(); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator cend() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT
|
||||
{ return const_iterator(node_algorithms::end_node(this->header_ptr()), this->priv_value_traits_ptr()); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE iterator root()
|
||||
@@ -195,32 +195,32 @@ struct bstbase3
|
||||
node_algorithms::replace_node( get_value_traits().to_node_ptr(*replace_this)
|
||||
, this->header_ptr()
|
||||
, get_value_traits().to_node_ptr(with_this));
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink)
|
||||
node_algorithms::init(replace_this.pointed_node());
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void rebalance()
|
||||
BOOST_INTRUSIVE_FORCEINLINE void rebalance() BOOST_NOEXCEPT
|
||||
{ node_algorithms::rebalance(this->header_ptr()); }
|
||||
|
||||
iterator rebalance_subtree(iterator root)
|
||||
{ return iterator(node_algorithms::rebalance_subtree(root.pointed_node()), this->priv_value_traits_ptr()); }
|
||||
iterator rebalance_subtree(iterator r) BOOST_NOEXCEPT
|
||||
{ return iterator(node_algorithms::rebalance_subtree(r.pointed_node()), this->priv_value_traits_ptr()); }
|
||||
|
||||
static iterator s_iterator_to(reference value)
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!stateful_value_traits));
|
||||
return iterator (value_traits::to_node_ptr(value), const_value_traits_ptr());
|
||||
}
|
||||
|
||||
static const_iterator s_iterator_to(const_reference value)
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!stateful_value_traits));
|
||||
return const_iterator (value_traits::to_node_ptr(*pointer_traits<pointer>::const_cast_from(pointer_traits<const_pointer>::pointer_to(value))), const_value_traits_ptr());
|
||||
}
|
||||
|
||||
iterator iterator_to(reference value)
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT
|
||||
{ return iterator (this->get_value_traits().to_node_ptr(value), this->priv_value_traits_ptr()); }
|
||||
|
||||
const_iterator iterator_to(const_reference value) const
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT
|
||||
{ return const_iterator (this->get_value_traits().to_node_ptr(*pointer_traits<pointer>::const_cast_from(pointer_traits<const_pointer>::pointer_to(value))), this->priv_value_traits_ptr()); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init_node(reference value)
|
||||
@@ -301,10 +301,10 @@ struct bstbase2
|
||||
: detail::ebo_functor_holder<value_compare>(value_compare(comp)), treeheader_t(vtraits)
|
||||
{}
|
||||
|
||||
const value_compare &comp() const
|
||||
const value_compare &get_comp() const
|
||||
{ return this->get(); }
|
||||
|
||||
value_compare &comp()
|
||||
value_compare &get_comp()
|
||||
{ return this->get(); }
|
||||
|
||||
typedef BOOST_INTRUSIVE_IMPDEF(typename value_traits::pointer) pointer;
|
||||
@@ -315,10 +315,10 @@ struct bstbase2
|
||||
typedef typename node_algorithms::insert_commit_data insert_commit_data;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE value_compare value_comp() const
|
||||
{ return this->comp(); }
|
||||
{ return this->get_comp(); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE key_compare key_comp() const
|
||||
{ return this->comp().key_comp(); }
|
||||
{ return this->get_comp().key_comp(); }
|
||||
|
||||
//lower_bound
|
||||
BOOST_INTRUSIVE_FORCEINLINE iterator lower_bound(const key_type &key)
|
||||
@@ -400,8 +400,8 @@ struct bstbase2
|
||||
template<class KeyType, class KeyTypeKeyCompare>
|
||||
std::pair<iterator,iterator> equal_range(const KeyType &key, KeyTypeKeyCompare comp)
|
||||
{
|
||||
std::pair<node_ptr, node_ptr> ret
|
||||
(node_algorithms::equal_range(this->header_ptr(), key, this->key_node_comp(comp)));
|
||||
std::pair<node_ptr, node_ptr> ret =
|
||||
node_algorithms::equal_range(this->header_ptr(), key, this->key_node_comp(comp));
|
||||
return std::pair<iterator, iterator>( iterator(ret.first, this->priv_value_traits_ptr())
|
||||
, iterator(ret.second, this->priv_value_traits_ptr()));
|
||||
}
|
||||
@@ -414,8 +414,8 @@ struct bstbase2
|
||||
std::pair<const_iterator, const_iterator>
|
||||
equal_range(const KeyType &key, KeyTypeKeyCompare comp) const
|
||||
{
|
||||
std::pair<node_ptr, node_ptr> ret
|
||||
(node_algorithms::equal_range(this->header_ptr(), key, this->key_node_comp(comp)));
|
||||
std::pair<node_ptr, node_ptr> ret =
|
||||
node_algorithms::equal_range(this->header_ptr(), key, this->key_node_comp(comp));
|
||||
return std::pair<const_iterator, const_iterator>( const_iterator(ret.first, this->priv_value_traits_ptr())
|
||||
, const_iterator(ret.second, this->priv_value_traits_ptr()));
|
||||
}
|
||||
@@ -427,8 +427,8 @@ struct bstbase2
|
||||
template<class KeyType, class KeyTypeKeyCompare>
|
||||
std::pair<iterator,iterator> lower_bound_range(const KeyType &key, KeyTypeKeyCompare comp)
|
||||
{
|
||||
std::pair<node_ptr, node_ptr> ret
|
||||
(node_algorithms::lower_bound_range(this->header_ptr(), key, this->key_node_comp(comp)));
|
||||
std::pair<node_ptr, node_ptr> ret =
|
||||
node_algorithms::lower_bound_range(this->header_ptr(), key, this->key_node_comp(comp));
|
||||
return std::pair<iterator, iterator>( iterator(ret.first, this->priv_value_traits_ptr())
|
||||
, iterator(ret.second, this->priv_value_traits_ptr()));
|
||||
}
|
||||
@@ -441,8 +441,8 @@ struct bstbase2
|
||||
std::pair<const_iterator, const_iterator>
|
||||
lower_bound_range(const KeyType &key, KeyTypeKeyCompare comp) const
|
||||
{
|
||||
std::pair<node_ptr, node_ptr> ret
|
||||
(node_algorithms::lower_bound_range(this->header_ptr(), key, this->key_node_comp(comp)));
|
||||
std::pair<node_ptr, node_ptr> ret =
|
||||
node_algorithms::lower_bound_range(this->header_ptr(), key, this->key_node_comp(comp));
|
||||
return std::pair<const_iterator, const_iterator>( const_iterator(ret.first, this->priv_value_traits_ptr())
|
||||
, const_iterator(ret.second, this->priv_value_traits_ptr()));
|
||||
}
|
||||
@@ -456,9 +456,9 @@ struct bstbase2
|
||||
std::pair<iterator,iterator> bounded_range
|
||||
(const KeyType &lower_key, const KeyType &upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed)
|
||||
{
|
||||
std::pair<node_ptr, node_ptr> ret
|
||||
(node_algorithms::bounded_range
|
||||
(this->header_ptr(), lower_key, upper_key, this->key_node_comp(comp), left_closed, right_closed));
|
||||
std::pair<node_ptr, node_ptr> ret =
|
||||
node_algorithms::bounded_range
|
||||
(this->header_ptr(), lower_key, upper_key, this->key_node_comp(comp), left_closed, right_closed);
|
||||
return std::pair<iterator, iterator>( iterator(ret.first, this->priv_value_traits_ptr())
|
||||
, iterator(ret.second, this->priv_value_traits_ptr()));
|
||||
}
|
||||
@@ -471,9 +471,9 @@ struct bstbase2
|
||||
std::pair<const_iterator,const_iterator> bounded_range
|
||||
(const KeyType &lower_key, const KeyType &upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const
|
||||
{
|
||||
std::pair<node_ptr, node_ptr> ret
|
||||
(node_algorithms::bounded_range
|
||||
(this->header_ptr(), lower_key, upper_key, this->key_node_comp(comp), left_closed, right_closed));
|
||||
std::pair<node_ptr, node_ptr> ret =
|
||||
node_algorithms::bounded_range
|
||||
(this->header_ptr(), lower_key, upper_key, this->key_node_comp(comp), left_closed, right_closed);
|
||||
return std::pair<const_iterator, const_iterator>( const_iterator(ret.first, this->priv_value_traits_ptr())
|
||||
, const_iterator(ret.second, this->priv_value_traits_ptr()));
|
||||
}
|
||||
@@ -735,7 +735,7 @@ class bstree_impl
|
||||
//! move constructor throws (this does not happen with predefined Boost.Intrusive hooks)
|
||||
//! or the move constructor of the comparison objet throws.
|
||||
bstree_impl(BOOST_RV_REF(bstree_impl) x)
|
||||
: data_type(::boost::move(x.comp()), ::boost::move(x.get_value_traits()))
|
||||
: data_type(::boost::move(x.get_comp()), ::boost::move(x.get_value_traits()))
|
||||
{
|
||||
this->swap(x);
|
||||
}
|
||||
@@ -761,42 +761,42 @@ class bstree_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator pointing to the beginning of the container.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator pointing to the beginning of the container.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns an iterator pointing to the end of the container.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator pointing to the end of the container.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator pointing to the end of the container.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning of the
|
||||
//! reversed container.
|
||||
@@ -804,7 +804,7 @@ class bstree_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
||||
//! of the reversed container.
|
||||
@@ -812,7 +812,7 @@ class bstree_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
||||
//! of the reversed container.
|
||||
@@ -820,7 +820,7 @@ class bstree_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns a reverse_iterator pointing to the end
|
||||
//! of the reversed container.
|
||||
@@ -828,7 +828,7 @@ class bstree_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
//! of the reversed container.
|
||||
@@ -836,7 +836,7 @@ class bstree_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
//! of the reversed container.
|
||||
@@ -844,28 +844,28 @@ class bstree_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns a iterator pointing to the root node of the container or end() if not present.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator pointing to the root node of the container or cend() if not present.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator pointing to the root node of the container or cend() if not present.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
@@ -877,7 +877,7 @@ class bstree_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
static bstree_impl &container_from_end_iterator(iterator end_iterator)
|
||||
static bstree_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast<bstree_impl&>
|
||||
(data_type::get_tree_base_from_end_iterator(end_iterator));
|
||||
@@ -891,7 +891,7 @@ class bstree_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
static const bstree_impl &container_from_end_iterator(const_iterator end_iterator)
|
||||
static const bstree_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast<bstree_impl&>
|
||||
(data_type::get_tree_base_from_end_iterator(end_iterator));
|
||||
@@ -905,7 +905,7 @@ class bstree_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
static bstree_impl &container_from_iterator(iterator it)
|
||||
static bstree_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return container_from_end_iterator(it.end_iterator_from_it()); }
|
||||
|
||||
//! <b>Precondition</b>: it must be a valid end const_iterator
|
||||
@@ -916,7 +916,7 @@ class bstree_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
static const bstree_impl &container_from_iterator(const_iterator it)
|
||||
static const bstree_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return container_from_end_iterator(it.end_iterator_from_it()); }
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
@@ -942,7 +942,7 @@ class bstree_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
bool empty() const
|
||||
bool empty() const BOOST_NOEXCEPT
|
||||
{
|
||||
if(ConstantTimeSize){
|
||||
return !this->data_type::sz_traits().get_size();
|
||||
@@ -958,9 +958,9 @@ class bstree_impl
|
||||
//! if constant-time size option is disabled. Constant time otherwise.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
size_type size() const
|
||||
size_type size() const BOOST_NOEXCEPT
|
||||
{
|
||||
if(constant_time_size)
|
||||
BOOST_IF_CONSTEXPR(constant_time_size)
|
||||
return this->sz_traits().get_size();
|
||||
else{
|
||||
return (size_type)node_algorithms::size(this->header_ptr());
|
||||
@@ -975,7 +975,7 @@ class bstree_impl
|
||||
void swap(bstree_impl& other)
|
||||
{
|
||||
//This can throw
|
||||
::boost::adl_move_swap(this->comp(), other.comp());
|
||||
::boost::adl_move_swap(this->get_comp(), other.get_comp());
|
||||
//These can't throw
|
||||
node_algorithms::swap_tree(this->header_ptr(), node_ptr(other.header_ptr()));
|
||||
this->sz_traits().swap(other.sz_traits());
|
||||
@@ -1008,7 +1008,7 @@ class bstree_impl
|
||||
,detail::node_cloner <Cloner, value_traits, AlgoType>(cloner, &this->get_value_traits())
|
||||
,detail::node_disposer<Disposer, value_traits, AlgoType>(disposer, &this->get_value_traits()));
|
||||
this->sz_traits().set_size(src.sz_traits().get_size());
|
||||
this->comp() = src.comp();
|
||||
this->get_comp() = src.get_comp();
|
||||
rollback.release();
|
||||
}
|
||||
}
|
||||
@@ -1043,7 +1043,7 @@ class bstree_impl
|
||||
,detail::node_cloner <Cloner, value_traits, AlgoType, false>(cloner, &this->get_value_traits())
|
||||
,detail::node_disposer<Disposer, value_traits, AlgoType>(disposer, &this->get_value_traits()));
|
||||
this->sz_traits().set_size(src.sz_traits().get_size());
|
||||
this->comp() = src.comp();
|
||||
this->get_comp() = src.get_comp();
|
||||
rollback.release();
|
||||
}
|
||||
}
|
||||
@@ -1062,8 +1062,7 @@ class bstree_impl
|
||||
iterator insert_equal(reference value)
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
iterator ret(node_algorithms::insert_equal_upper_bound
|
||||
(this->header_ptr(), to_insert, this->key_node_comp(this->key_comp())), this->priv_value_traits_ptr());
|
||||
this->sz_traits().increment();
|
||||
@@ -1087,8 +1086,7 @@ class bstree_impl
|
||||
iterator insert_equal(const_iterator hint, reference value)
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
iterator ret(node_algorithms::insert_equal
|
||||
(this->header_ptr(), hint.pointed_node(), to_insert, this->key_node_comp(this->key_comp())), this->priv_value_traits_ptr());
|
||||
this->sz_traits().increment();
|
||||
@@ -1105,7 +1103,7 @@ class bstree_impl
|
||||
//! size of the range. However, it is linear in N if the range is already sorted
|
||||
//! by value_comp().
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//! <b>Throws</b>: If the comparison functor call throws.
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references.
|
||||
//! No copy-constructors are called.
|
||||
@@ -1125,7 +1123,7 @@ class bstree_impl
|
||||
//! <b>Complexity</b>: Average complexity for insert element is at
|
||||
//! most logarithmic.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//! <b>Throws</b>: If the comparison functor call throws.
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references.
|
||||
//! No copy-constructors are called.
|
||||
@@ -1151,7 +1149,7 @@ class bstree_impl
|
||||
//! constant time (two comparisons in the worst case)
|
||||
//! if t is inserted immediately before hint.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//! <b>Throws</b>: If the comparison functor call throws.
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references.
|
||||
//! No copy-constructors are called.
|
||||
@@ -1174,7 +1172,7 @@ class bstree_impl
|
||||
//! size of the range. However, it is linear in N if the range is already sorted
|
||||
//! by value_comp().
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//! <b>Throws</b>: If the comparison functor call throws.
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references.
|
||||
//! No copy-constructors are called.
|
||||
@@ -1314,11 +1312,10 @@ class bstree_impl
|
||||
//! <b>Notes</b>: This function has only sense if a "insert_check" has been
|
||||
//! previously executed to fill "commit_data". No value should be inserted or
|
||||
//! erased between the "insert_check" and "insert_commit" calls.
|
||||
iterator insert_unique_commit(reference value, const insert_commit_data &commit_data)
|
||||
iterator insert_unique_commit(reference value, const insert_commit_data &commit_data) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
|
||||
#if !(defined(BOOST_DISABLE_ASSERTS) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && defined(NDEBUG) ))
|
||||
//Test insertion position is correct
|
||||
@@ -1328,8 +1325,8 @@ class bstree_impl
|
||||
}
|
||||
//Check if the insertion point is correct to detect wrong
|
||||
//uses insert_unique_check
|
||||
BOOST_ASSERT(( p == this->end() || !this->comp()(*p, value) ));
|
||||
BOOST_ASSERT(( p == this->begin() || !this->comp()(value, *--p) ));
|
||||
BOOST_ASSERT(( p == this->end() || !this->get_comp()(*p, value) ));
|
||||
BOOST_ASSERT(( p == this->begin() || !this->get_comp()(value, *--p) ));
|
||||
#endif
|
||||
|
||||
node_algorithms::insert_unique_commit
|
||||
@@ -1352,11 +1349,10 @@ class bstree_impl
|
||||
//! the successor of "value" container ordering invariant will be broken.
|
||||
//! This is a low-level function to be used only for performance reasons
|
||||
//! by advanced users.
|
||||
iterator insert_before(const_iterator pos, reference value)
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
this->sz_traits().increment();
|
||||
return iterator(node_algorithms::insert_before
|
||||
(this->header_ptr(), pos.pointed_node(), to_insert), this->priv_value_traits_ptr());
|
||||
@@ -1376,11 +1372,10 @@ class bstree_impl
|
||||
//! This function is slightly more efficient than using "insert_before".
|
||||
//! This is a low-level function to be used only for performance reasons
|
||||
//! by advanced users.
|
||||
void push_back(reference value)
|
||||
void push_back(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
this->sz_traits().increment();
|
||||
node_algorithms::push_back(this->header_ptr(), to_insert);
|
||||
}
|
||||
@@ -1399,11 +1394,10 @@ class bstree_impl
|
||||
//! This function is slightly more efficient than using "insert_before".
|
||||
//! This is a low-level function to be used only for performance reasons
|
||||
//! by advanced users.
|
||||
void push_front(reference value)
|
||||
void push_front(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
this->sz_traits().increment();
|
||||
node_algorithms::push_front(this->header_ptr(), to_insert);
|
||||
}
|
||||
@@ -1416,16 +1410,15 @@ class bstree_impl
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references)
|
||||
//! to the erased elements. No destructors are called.
|
||||
iterator erase(const_iterator i)
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT
|
||||
{
|
||||
const_iterator ret(i);
|
||||
++ret;
|
||||
node_ptr to_erase(i.pointed_node());
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!node_algorithms::unique(to_erase));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(to_erase));
|
||||
node_algorithms::erase(this->header_ptr(), to_erase);
|
||||
this->sz_traits().decrement();
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink)
|
||||
node_algorithms::init(to_erase);
|
||||
return ret.unconst();
|
||||
}
|
||||
@@ -1439,7 +1432,7 @@ class bstree_impl
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references)
|
||||
//! to the erased elements. No destructors are called.
|
||||
iterator erase(const_iterator b, const_iterator e)
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT
|
||||
{ size_type n; return this->private_erase(b, e, n); }
|
||||
|
||||
//! <b>Effects</b>: Erases all the elements with the given value.
|
||||
@@ -1452,7 +1445,7 @@ class bstree_impl
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references)
|
||||
//! to the erased elements. No destructors are called.
|
||||
size_type erase(const key_type &key)
|
||||
size_type erase(const key_type &key) BOOST_NOEXCEPT
|
||||
{ return this->erase(key, this->key_comp()); }
|
||||
|
||||
//! <b>Requires</b>: key is a value such that `*this` is partitioned with respect to
|
||||
@@ -1493,7 +1486,7 @@ class bstree_impl
|
||||
//! <b>Note</b>: Invalidates the iterators
|
||||
//! to the erased elements.
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer)
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_erase(i.pointed_node());
|
||||
iterator ret(this->erase(i));
|
||||
@@ -1536,7 +1529,7 @@ class bstree_impl
|
||||
//! <b>Note</b>: Invalidates the iterators
|
||||
//! to the erased elements.
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT
|
||||
{ size_type n; return this->private_erase(b, e, n, disposer); }
|
||||
|
||||
//! <b>Requires</b>: key is a value such that `*this` is partitioned with respect to
|
||||
@@ -1577,9 +1570,9 @@ class bstree_impl
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references)
|
||||
//! to the erased elements. No destructors are called.
|
||||
void clear()
|
||||
void clear() BOOST_NOEXCEPT
|
||||
{
|
||||
if(safemode_or_autounlink){
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink){
|
||||
this->clear_and_dispose(detail::null_disposer());
|
||||
}
|
||||
else{
|
||||
@@ -1598,7 +1591,7 @@ class bstree_impl
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references)
|
||||
//! to the erased elements. Calls N times to disposer functor.
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer)
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
node_algorithms::clear_and_dispose(this->header_ptr()
|
||||
, detail::node_disposer<Disposer, value_traits, AlgoType>(disposer, &this->get_value_traits()));
|
||||
@@ -1841,7 +1834,7 @@ class bstree_impl
|
||||
//!
|
||||
//! <b>Note</b>: This static function is available only if the <i>value traits</i>
|
||||
//! is stateless.
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: value must be an lvalue and shall be in a set of
|
||||
//! appropriate type. Otherwise the behavior is undefined.
|
||||
@@ -1855,7 +1848,7 @@ class bstree_impl
|
||||
//!
|
||||
//! <b>Note</b>: This static function is available only if the <i>value traits</i>
|
||||
//! is stateless.
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: value must be an lvalue and shall be in a set of
|
||||
//! appropriate type. Otherwise the behavior is undefined.
|
||||
@@ -1866,7 +1859,7 @@ class bstree_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: value must be an lvalue and shall be in a set of
|
||||
//! appropriate type. Otherwise the behavior is undefined.
|
||||
@@ -1877,7 +1870,7 @@ class bstree_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: value shall not be in a container.
|
||||
//!
|
||||
@@ -1890,7 +1883,7 @@ class bstree_impl
|
||||
//!
|
||||
//! <b>Note</b>: This function puts the hook in the well-known default state
|
||||
//! used by auto_unlink and safe hooks.
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
|
||||
@@ -1904,14 +1897,14 @@ class bstree_impl
|
||||
//! only be used for more unlink_leftmost_without_rebalance calls.
|
||||
//! This function is normally used to achieve a step by step
|
||||
//! controlled destruction of the container.
|
||||
pointer unlink_leftmost_without_rebalance()
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_be_disposed(node_algorithms::unlink_leftmost_without_rebalance
|
||||
(this->header_ptr()));
|
||||
if(!to_be_disposed)
|
||||
return 0;
|
||||
this->sz_traits().decrement();
|
||||
if(safemode_or_autounlink)//If this is commented does not work with normal_link
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink)//If this is commented does not work with normal_link
|
||||
node_algorithms::init(to_be_disposed);
|
||||
return this->get_value_traits().to_value_ptr(to_be_disposed);
|
||||
}
|
||||
@@ -1932,14 +1925,14 @@ class bstree_impl
|
||||
//! with_this is not equivalent to *replace_this according to the
|
||||
//! ordering rules. This function is faster than erasing and inserting
|
||||
//! the node, since no rebalancing or comparison is needed.
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Rebalances the tree.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear.
|
||||
void rebalance();
|
||||
void rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: old_root is a node of a tree.
|
||||
//!
|
||||
@@ -1950,7 +1943,7 @@ class bstree_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the elements in the subtree.
|
||||
iterator rebalance_subtree(iterator root);
|
||||
iterator rebalance_subtree(iterator r) BOOST_NOEXCEPT;
|
||||
|
||||
#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
|
||||
@@ -1966,12 +1959,12 @@ class bstree_impl
|
||||
//! If the user calls
|
||||
//! this function with a constant time size container or stateful comparison
|
||||
//! functor a compilation error will be issued.
|
||||
static void remove_node(reference value)
|
||||
static void remove_node(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!constant_time_size));
|
||||
node_ptr to_remove(value_traits::to_node_ptr(value));
|
||||
node_algorithms::unlink(to_remove);
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink)
|
||||
node_algorithms::init(to_remove);
|
||||
}
|
||||
|
||||
@@ -2061,8 +2054,7 @@ class bstree_impl
|
||||
typedef typename get_node_checker<AlgoType, ValueTraits, nodeptr_comp_t, ExtraChecker>::type node_checker_t;
|
||||
typename node_checker_t::return_type checker_return;
|
||||
node_algorithms::check(this->header_ptr(), node_checker_t(nodeptr_comp, extra_checker), checker_return);
|
||||
if (constant_time_size)
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(this->sz_traits().get_size() == checker_return.node_count);
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(!constant_time_size || this->sz_traits().get_size() == checker_return.node_count);
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: Asserts the integrity of the container.
|
||||
@@ -2224,16 +2216,16 @@ class bstree
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(bstree) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bstree &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bstree &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<bstree &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const bstree &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const bstree &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const bstree &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bstree &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bstree &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<bstree &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const bstree &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const bstree &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const bstree &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2014
|
||||
// (C) Copyright Ion Gaztanaga 2007-2021
|
||||
// (C) Copyright Daniel Steck 2021
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -79,14 +80,12 @@ struct bstree_node_checker
|
||||
: base_checker_t(extra_checker), comp_(comp)
|
||||
{}
|
||||
|
||||
void operator () (const const_node_ptr& p,
|
||||
void operator () (const_node_ptr p,
|
||||
const return_type& check_return_left, const return_type& check_return_right,
|
||||
return_type& check_return)
|
||||
{
|
||||
if (check_return_left.max_key_node_ptr)
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(!comp_(p, check_return_left.max_key_node_ptr));
|
||||
if (check_return_right.min_key_node_ptr)
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(!comp_(check_return_right.min_key_node_ptr, p));
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(!check_return_left.max_key_node_ptr || !comp_(p, check_return_left.max_key_node_ptr));
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(!check_return_right.min_key_node_ptr || !comp_(check_return_right.min_key_node_ptr, p));
|
||||
check_return.min_key_node_ptr = node_traits::get_left(p)? check_return_left.min_key_node_ptr : p;
|
||||
check_return.max_key_node_ptr = node_traits::get_right(p)? check_return_right.max_key_node_ptr : p;
|
||||
check_return.node_count = check_return_left.node_count + check_return_right.node_count + 1;
|
||||
@@ -187,7 +186,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
template<class Disposer>
|
||||
struct dispose_subtree_disposer
|
||||
{
|
||||
BOOST_INTRUSIVE_FORCEINLINE dispose_subtree_disposer(Disposer &disp, const node_ptr & subtree)
|
||||
BOOST_INTRUSIVE_FORCEINLINE dispose_subtree_disposer(Disposer &disp, node_ptr subtree)
|
||||
: disposer_(&disp), subtree_(subtree)
|
||||
{}
|
||||
|
||||
@@ -214,7 +213,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Complexity</b>: Constant time.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr begin_node(const const_node_ptr & header)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr begin_node(const_node_ptr header) BOOST_NOEXCEPT
|
||||
{ return node_traits::get_left(header); }
|
||||
|
||||
//! <b>Requires</b>: 'header' is the header node of a tree.
|
||||
@@ -224,7 +223,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Complexity</b>: Constant time.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr end_node(const const_node_ptr & header)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr end_node(const_node_ptr header) BOOST_NOEXCEPT
|
||||
{ return detail::uncast(header); }
|
||||
|
||||
//! <b>Requires</b>: 'header' is the header node of a tree.
|
||||
@@ -234,13 +233,13 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Complexity</b>: Constant time.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr root_node(const const_node_ptr & header)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr root_node(const_node_ptr header) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr p = node_traits::get_parent(header);
|
||||
return p ? p : detail::uncast(header);
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: 'node' is a node of the tree or a node initialized
|
||||
//! <b>Requires</b>: 'n' is a node of the tree or a node initialized
|
||||
//! by init(...) or init_node.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns true if the node is initialized by init() or init_node().
|
||||
@@ -248,18 +247,18 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Complexity</b>: Constant time.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr & node)
|
||||
{ return !NodeTraits::get_parent(node); }
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool unique(const_node_ptr n) BOOST_NOEXCEPT
|
||||
{ return !NodeTraits::get_parent(n); }
|
||||
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
//! <b>Requires</b>: 'node' is a node of the tree or a header node.
|
||||
//! <b>Requires</b>: 'n' is a node of the tree or a header node.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the header of the tree.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static node_ptr get_header(const const_node_ptr & node);
|
||||
static node_ptr get_header(const_node_ptr n);
|
||||
#endif
|
||||
|
||||
//! <b>Requires</b>: node1 and node2 can't be header nodes
|
||||
@@ -277,7 +276,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! node1 and node2 are not equivalent according to the ordering rules.
|
||||
//!
|
||||
//!Experimental function
|
||||
static void swap_nodes(node_ptr node1, node_ptr node2)
|
||||
static void swap_nodes(node_ptr node1, node_ptr node2) BOOST_NOEXCEPT
|
||||
{
|
||||
if(node1 == node2)
|
||||
return;
|
||||
@@ -301,7 +300,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! node1 and node2 are not equivalent according to the ordering rules.
|
||||
//!
|
||||
//!Experimental function
|
||||
static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2)
|
||||
static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2) BOOST_NOEXCEPT
|
||||
{
|
||||
if(node1 == node2)
|
||||
return;
|
||||
@@ -398,38 +397,47 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
NodeTraits::set_parent(node1, NodeTraits::get_parent(node2));
|
||||
NodeTraits::set_parent(node2, temp);
|
||||
|
||||
//Now adjust adjacent nodes for newly inserted node 1
|
||||
//Now adjust child nodes for newly inserted node 1
|
||||
if((temp = NodeTraits::get_left(node1))){
|
||||
NodeTraits::set_parent(temp, node1);
|
||||
}
|
||||
if((temp = NodeTraits::get_right(node1))){
|
||||
NodeTraits::set_parent(temp, node1);
|
||||
}
|
||||
if((temp = NodeTraits::get_parent(node1)) &&
|
||||
//The header has been already updated so avoid it
|
||||
temp != header2){
|
||||
if(NodeTraits::get_left(temp) == node2){
|
||||
NodeTraits::set_left(temp, node1);
|
||||
}
|
||||
if(NodeTraits::get_right(temp) == node2){
|
||||
NodeTraits::set_right(temp, node1);
|
||||
}
|
||||
}
|
||||
//Now adjust adjacent nodes for newly inserted node 2
|
||||
//Now adjust child nodes for newly inserted node 2
|
||||
if((temp = NodeTraits::get_left(node2))){
|
||||
NodeTraits::set_parent(temp, node2);
|
||||
}
|
||||
if((temp = NodeTraits::get_right(node2))){
|
||||
NodeTraits::set_parent(temp, node2);
|
||||
}
|
||||
if((temp = NodeTraits::get_parent(node2)) &&
|
||||
//The header has been already updated so avoid it
|
||||
temp != header1){
|
||||
if(NodeTraits::get_left(temp) == node1){
|
||||
NodeTraits::set_left(temp, node2);
|
||||
|
||||
//Finally adjust parent nodes
|
||||
if ((temp = NodeTraits::get_parent(node1)) == NodeTraits::get_parent(node2)) {
|
||||
// special logic for the case where the nodes are siblings
|
||||
const node_ptr left = NodeTraits::get_left(temp);
|
||||
NodeTraits::set_left(temp, NodeTraits::get_right(temp));
|
||||
NodeTraits::set_right(temp, left);
|
||||
} else {
|
||||
if ((temp = NodeTraits::get_parent(node1)) &&
|
||||
//The header has been already updated so avoid it
|
||||
temp != header2) {
|
||||
if (NodeTraits::get_left(temp) == node2) {
|
||||
NodeTraits::set_left(temp, node1);
|
||||
}
|
||||
if (NodeTraits::get_right(temp) == node2) {
|
||||
NodeTraits::set_right(temp, node1);
|
||||
}
|
||||
}
|
||||
if(NodeTraits::get_right(temp) == node1){
|
||||
NodeTraits::set_right(temp, node2);
|
||||
if ((temp = NodeTraits::get_parent(node2)) &&
|
||||
//The header has been already updated so avoid it
|
||||
temp != header1) {
|
||||
if (NodeTraits::get_left(temp) == node1) {
|
||||
NodeTraits::set_left(temp, node2);
|
||||
}
|
||||
if (NodeTraits::get_right(temp) == node1) {
|
||||
NodeTraits::set_right(temp, node2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -448,10 +456,8 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! new_node is not equivalent to node_to_be_replaced according to the
|
||||
//! ordering rules. This function is faster than erasing and inserting
|
||||
//! the node, since no rebalancing and comparison is needed. Experimental function
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node) BOOST_NOEXCEPT
|
||||
{
|
||||
if(node_to_be_replaced == new_node)
|
||||
return;
|
||||
replace_node(node_to_be_replaced, base_type::get_header(node_to_be_replaced), new_node);
|
||||
}
|
||||
|
||||
@@ -469,10 +475,9 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! new_node is not equivalent to node_to_be_replaced according to the
|
||||
//! ordering rules. This function is faster than erasing and inserting
|
||||
//! the node, since no rebalancing or comparison is needed. Experimental function
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node)
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node) BOOST_NOEXCEPT
|
||||
{
|
||||
if(node_to_be_replaced == new_node)
|
||||
return;
|
||||
BOOST_ASSERT(node_to_be_replaced != new_node);
|
||||
|
||||
//Update header if necessary
|
||||
if(node_to_be_replaced == NodeTraits::get_left(header)){
|
||||
@@ -513,44 +518,44 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
}
|
||||
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
//! <b>Requires</b>: 'node' is a node from the tree except the header.
|
||||
//! <b>Requires</b>: 'n' is a node from the tree except the header.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the next node of the tree.
|
||||
//!
|
||||
//! <b>Complexity</b>: Average constant time.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static node_ptr next_node(const node_ptr & node);
|
||||
static node_ptr next_node(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: 'node' is a node from the tree except the leftmost node.
|
||||
//! <b>Requires</b>: 'n' is a node from the tree except the leftmost node.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the previous node of the tree.
|
||||
//!
|
||||
//! <b>Complexity</b>: Average constant time.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static node_ptr prev_node(const node_ptr & node);
|
||||
static node_ptr prev_node(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: 'node' is a node of a tree but not the header.
|
||||
//! <b>Requires</b>: 'n' is a node of a tree but not the header.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the minimum node of the subtree starting at p.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic to the size of the subtree.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static node_ptr minimum(node_ptr node);
|
||||
static node_ptr minimum(node_ptr n);
|
||||
|
||||
//! <b>Requires</b>: 'node' is a node of a tree but not the header.
|
||||
//! <b>Requires</b>: 'n' is a node of a tree but not the header.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the maximum node of the subtree starting at p.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic to the size of the subtree.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static node_ptr maximum(node_ptr node);
|
||||
static node_ptr maximum(node_ptr n);
|
||||
#endif
|
||||
|
||||
//! <b>Requires</b>: 'node' must not be part of any tree.
|
||||
//! <b>Requires</b>: 'n' must not be part of any tree.
|
||||
//!
|
||||
//! <b>Effects</b>: After the function unique(node) == true.
|
||||
//!
|
||||
@@ -559,11 +564,11 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init(node_ptr node)
|
||||
static void init(node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
NodeTraits::set_parent(node, node_ptr());
|
||||
NodeTraits::set_left(node, node_ptr());
|
||||
NodeTraits::set_right(node, node_ptr());
|
||||
NodeTraits::set_parent(n, node_ptr());
|
||||
NodeTraits::set_left(n, node_ptr());
|
||||
NodeTraits::set_right(n, node_ptr());
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: Returns true if node is in the same state as if called init(node)
|
||||
@@ -571,14 +576,14 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr & node)
|
||||
static bool inited(const_node_ptr n)
|
||||
{
|
||||
return !NodeTraits::get_parent(node) &&
|
||||
!NodeTraits::get_left(node) &&
|
||||
!NodeTraits::get_right(node) ;
|
||||
return !NodeTraits::get_parent(n) &&
|
||||
!NodeTraits::get_left(n) &&
|
||||
!NodeTraits::get_right(n) ;
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: node must not be part of any tree.
|
||||
//! <b>Requires</b>: header must not be part of any tree.
|
||||
//!
|
||||
//! <b>Effects</b>: Initializes the header to represent an empty tree.
|
||||
//! unique(header) == true.
|
||||
@@ -587,8 +592,8 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init_header(node_ptr header)
|
||||
//! <b>Nodes</b>: If header is inserted in a tree, this function corrupts the tree.
|
||||
static void init_header(node_ptr header) BOOST_NOEXCEPT
|
||||
{
|
||||
NodeTraits::set_parent(header, node_ptr());
|
||||
NodeTraits::set_left(header, header);
|
||||
@@ -599,15 +604,15 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! taking a node_ptr parameter and shouldn't throw.
|
||||
//!
|
||||
//! <b>Effects</b>: Empties the target tree calling
|
||||
//! <tt>void disposer::operator()(const node_ptr &)</tt> for every node of the tree
|
||||
//! <tt>void disposer::operator()(node_ptr)</tt> for every node of the tree
|
||||
//! except the header.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of element of the source tree plus the.
|
||||
//! number of elements of tree target tree when calling this function.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner functor throws. If this happens target nodes are disposed.
|
||||
//! <b>Throws</b>: Nothing.
|
||||
template<class Disposer>
|
||||
static void clear_and_dispose(const node_ptr & header, Disposer disposer)
|
||||
static void clear_and_dispose(node_ptr header, Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr source_root = NodeTraits::get_parent(header);
|
||||
if(!source_root)
|
||||
@@ -629,7 +634,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! only be used for more unlink_leftmost_without_rebalance calls.
|
||||
//! This function is normally used to achieve a step by step
|
||||
//! controlled destruction of the tree.
|
||||
static node_ptr unlink_leftmost_without_rebalance(node_ptr header)
|
||||
static node_ptr unlink_leftmost_without_rebalance(node_ptr header) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr leftmost = NodeTraits::get_left(header);
|
||||
if (leftmost == header)
|
||||
@@ -659,14 +664,14 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
return leftmost;
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: node is a node of the tree but it's not the header.
|
||||
//! <b>Requires</b>: 'header' the header of the tree.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the number of nodes of the subtree.
|
||||
//! <b>Effects</b>: Returns the number of nodes of the tree.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear time.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static std::size_t size(const const_node_ptr & header)
|
||||
static std::size_t size(const_node_ptr header) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr beg(begin_node(header));
|
||||
node_ptr end(end_node(header));
|
||||
@@ -684,7 +689,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void swap_tree(node_ptr header1, node_ptr header2)
|
||||
static void swap_tree(node_ptr header1, node_ptr header2) BOOST_NOEXCEPT
|
||||
{
|
||||
if(header1 == header2)
|
||||
return;
|
||||
@@ -732,7 +737,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static bool is_header(const const_node_ptr & p);
|
||||
static bool is_header(const_node_ptr p) BOOST_NOEXCEPT;
|
||||
#endif
|
||||
|
||||
//! <b>Requires</b>: "header" must be the header node of a tree.
|
||||
@@ -748,7 +753,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Throws</b>: If "comp" throws.
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr find
|
||||
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
{
|
||||
node_ptr end = detail::uncast(header);
|
||||
node_ptr y = lower_bound(header, key, comp);
|
||||
@@ -778,7 +783,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Note</b>: Experimental function, the interface might change.
|
||||
template< class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> bounded_range
|
||||
( const const_node_ptr & header
|
||||
( const_node_ptr header
|
||||
, const KeyType &lower_key
|
||||
, const KeyType &upper_key
|
||||
, KeyNodePtrCompare comp
|
||||
@@ -845,7 +850,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Throws</b>: If "comp" throws.
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::size_t count
|
||||
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
{
|
||||
std::pair<node_ptr, node_ptr> ret = equal_range(header, key, comp);
|
||||
std::size_t n = 0;
|
||||
@@ -871,7 +876,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Throws</b>: If "comp" throws.
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static std::pair<node_ptr, node_ptr> equal_range
|
||||
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
{
|
||||
return bounded_range(header, key, key, comp, true, true);
|
||||
}
|
||||
@@ -891,7 +896,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Throws</b>: If "comp" throws.
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> lower_bound_range
|
||||
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
{
|
||||
node_ptr const lb(lower_bound(header, key, comp));
|
||||
std::pair<node_ptr, node_ptr> ret_ii(lb, lb);
|
||||
@@ -915,7 +920,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Throws</b>: If "comp" throws.
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr lower_bound
|
||||
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
{
|
||||
return lower_bound_loop(NodeTraits::get_parent(header), detail::uncast(header), key, comp);
|
||||
}
|
||||
@@ -933,7 +938,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Throws</b>: If "comp" throws.
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr upper_bound
|
||||
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
{
|
||||
return upper_bound_loop(NodeTraits::get_parent(header), detail::uncast(header), key, comp);
|
||||
}
|
||||
@@ -956,7 +961,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! previously executed to fill "commit_data". No value should be inserted or
|
||||
//! erased between the "insert_check" and "insert_commit" calls.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void insert_unique_commit
|
||||
(node_ptr header, node_ptr new_value, const insert_commit_data &commit_data)
|
||||
(node_ptr header, node_ptr new_value, const insert_commit_data &commit_data) BOOST_NOEXCEPT
|
||||
{ return insert_commit(header, new_value, commit_data); }
|
||||
|
||||
//! <b>Requires</b>: "header" must be the header node of a tree.
|
||||
@@ -995,7 +1000,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! if no more objects are inserted or erased from the set.
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, bool> insert_unique_check
|
||||
(const const_node_ptr & header, const KeyType &key
|
||||
(const_node_ptr header, const KeyType &key
|
||||
,KeyNodePtrCompare comp, insert_commit_data &commit_data
|
||||
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
, std::size_t *pdepth = 0
|
||||
@@ -1014,7 +1019,8 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
while(x){
|
||||
++depth;
|
||||
y = x;
|
||||
x = (left_child = comp(key, x)) ?
|
||||
left_child = comp(key, x);
|
||||
x = left_child ?
|
||||
NodeTraits::get_left(x) : (prev = y, NodeTraits::get_right(x));
|
||||
}
|
||||
|
||||
@@ -1072,7 +1078,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! if no more objects are inserted or erased from the set.
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, bool> insert_unique_check
|
||||
(const const_node_ptr & header, const node_ptr &hint, const KeyType &key
|
||||
(const_node_ptr header, node_ptr hint, const KeyType &key
|
||||
,KeyNodePtrCompare comp, insert_commit_data &commit_data
|
||||
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
, std::size_t *pdepth = 0
|
||||
@@ -1195,7 +1201,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
, std::size_t *pdepth = 0
|
||||
#endif
|
||||
)
|
||||
) BOOST_NOEXCEPT
|
||||
{
|
||||
insert_commit_data commit_data;
|
||||
insert_before_check(header, pos, commit_data, pdepth);
|
||||
@@ -1221,7 +1227,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
, std::size_t *pdepth = 0
|
||||
#endif
|
||||
)
|
||||
) BOOST_NOEXCEPT
|
||||
{
|
||||
insert_commit_data commit_data;
|
||||
push_back_check(header, commit_data, pdepth);
|
||||
@@ -1246,14 +1252,14 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
, std::size_t *pdepth = 0
|
||||
#endif
|
||||
)
|
||||
) BOOST_NOEXCEPT
|
||||
{
|
||||
insert_commit_data commit_data;
|
||||
push_front_check(header, commit_data, pdepth);
|
||||
insert_commit(header, new_node, commit_data);
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: 'node' can't be a header node.
|
||||
//! <b>Requires</b>: 'n' can't be a header node.
|
||||
//!
|
||||
//! <b>Effects</b>: Calculates the depth of a node: the depth of a
|
||||
//! node is the length (number of edges) of the path from the root
|
||||
@@ -1262,13 +1268,13 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Complexity</b>: Logarithmic to the number of nodes in the tree.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static std::size_t depth(const_node_ptr node)
|
||||
static std::size_t depth(const_node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
std::size_t depth = 0;
|
||||
node_ptr p_parent;
|
||||
while(node != NodeTraits::get_parent(p_parent = NodeTraits::get_parent(node))){
|
||||
while(n != NodeTraits::get_parent(p_parent = NodeTraits::get_parent(n))){
|
||||
++depth;
|
||||
node = p_parent;
|
||||
n = p_parent;
|
||||
}
|
||||
return depth;
|
||||
}
|
||||
@@ -1278,13 +1284,13 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! take a node_ptr and shouldn't throw.
|
||||
//!
|
||||
//! <b>Effects</b>: First empties target tree calling
|
||||
//! <tt>void disposer::operator()(const node_ptr &)</tt> for every node of the tree
|
||||
//! <tt>void disposer::operator()(node_ptr)</tt> for every node of the tree
|
||||
//! except the header.
|
||||
//!
|
||||
//! Then, duplicates the entire tree pointed by "source_header" cloning each
|
||||
//! source node with <tt>node_ptr Cloner::operator()(const node_ptr &)</tt> to obtain
|
||||
//! source node with <tt>node_ptr Cloner::operator()(node_ptr)</tt> to obtain
|
||||
//! the nodes of the target tree. If "cloner" throws, the cloned target nodes
|
||||
//! are disposed using <tt>void disposer(const node_ptr &)</tt>.
|
||||
//! are disposed using <tt>void disposer(node_ptr )</tt>.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of element of the source tree plus the
|
||||
//! number of elements of tree target tree when calling this function.
|
||||
@@ -1292,7 +1298,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Throws</b>: If cloner functor throws. If this happens target nodes are disposed.
|
||||
template <class Cloner, class Disposer>
|
||||
static void clone
|
||||
(const const_node_ptr & source_header, node_ptr target_header, Cloner cloner, Disposer disposer)
|
||||
(const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer)
|
||||
{
|
||||
if(!unique(target_header)){
|
||||
clear_and_dispose(target_header, disposer);
|
||||
@@ -1316,7 +1322,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Complexity</b>: Amortized constant time.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void erase(node_ptr header, node_ptr z)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void erase(node_ptr header, node_ptr z) BOOST_NOEXCEPT
|
||||
{
|
||||
data_for_rebalance ignored;
|
||||
erase(header, z, ignored);
|
||||
@@ -1359,20 +1365,20 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
transfer_equal(header1, comp, header2, z, ignored);
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: node is a tree node but not the header.
|
||||
//! <b>Requires</b>: 'n' is a tree node but not the header.
|
||||
//!
|
||||
//! <b>Effects</b>: Unlinks the node and rebalances the tree.
|
||||
//!
|
||||
//! <b>Complexity</b>: Average complexity is constant time.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void unlink(node_ptr node)
|
||||
static void unlink(node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr x = NodeTraits::get_parent(node);
|
||||
node_ptr x = NodeTraits::get_parent(n);
|
||||
if(x){
|
||||
while(!base_type::is_header(x))
|
||||
x = NodeTraits::get_parent(x);
|
||||
erase(x, node);
|
||||
erase(x, n);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1383,7 +1389,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear.
|
||||
static void rebalance(node_ptr header)
|
||||
static void rebalance(node_ptr header) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr root = NodeTraits::get_parent(header);
|
||||
if(root){
|
||||
@@ -1400,7 +1406,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear.
|
||||
static node_ptr rebalance_subtree(node_ptr old_root)
|
||||
static node_ptr rebalance_subtree(node_ptr old_root) BOOST_NOEXCEPT
|
||||
{
|
||||
//Taken from:
|
||||
//"Tree rebalancing in optimal time and space"
|
||||
@@ -1449,7 +1455,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Note</b>: The method might not have effect when asserts are turned off (e.g., with NDEBUG).
|
||||
//! Experimental function, interface might change in future versions.
|
||||
template<class Checker>
|
||||
static void check(const const_node_ptr& header, Checker checker, typename Checker::return_type& checker_return)
|
||||
static void check(const_node_ptr header, Checker checker, typename Checker::return_type& checker_return)
|
||||
{
|
||||
const_node_ptr root_node_ptr = NodeTraits::get_parent(header);
|
||||
if (!root_node_ptr){
|
||||
@@ -1579,14 +1585,14 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
info.x_parent = x_parent;
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: node is a node of the tree but it's not the header.
|
||||
//! <b>Requires</b>: 'subtree' is a node of the tree but it's not the header.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the number of nodes of the subtree.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear time.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static std::size_t subtree_size(const const_node_ptr & subtree)
|
||||
static std::size_t subtree_size(const_node_ptr subtree) BOOST_NOEXCEPT
|
||||
{
|
||||
std::size_t count = 0;
|
||||
if (subtree){
|
||||
@@ -1629,7 +1635,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool is_left_child(const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool is_left_child(node_ptr p) BOOST_NOEXCEPT
|
||||
{ return NodeTraits::get_left(NodeTraits::get_parent(p)) == p; }
|
||||
|
||||
//! <b>Requires</b>: p is a node of a tree.
|
||||
@@ -1639,7 +1645,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool is_right_child(const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool is_right_child(node_ptr p) BOOST_NOEXCEPT
|
||||
{ return NodeTraits::get_right(NodeTraits::get_parent(p)) == p; }
|
||||
|
||||
static void insert_before_check
|
||||
@@ -1666,7 +1672,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
, std::size_t *pdepth = 0
|
||||
#endif
|
||||
)
|
||||
) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr prev(NodeTraits::get_right(header));
|
||||
if(pdepth){
|
||||
@@ -1681,7 +1687,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
, std::size_t *pdepth = 0
|
||||
#endif
|
||||
)
|
||||
) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr pos(NodeTraits::get_left(header));
|
||||
if(pdepth){
|
||||
@@ -1759,7 +1765,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
}
|
||||
|
||||
static void insert_commit
|
||||
(node_ptr header, node_ptr new_node, const insert_commit_data &commit_data)
|
||||
(node_ptr header, node_ptr new_node, const insert_commit_data &commit_data) BOOST_NOEXCEPT
|
||||
{
|
||||
//Check if commit_data has not been initialized by a insert_unique_check call.
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(commit_data.node != node_ptr());
|
||||
@@ -1785,7 +1791,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
}
|
||||
|
||||
//Fix header and own's parent data when replacing x with own, providing own's old data with parent
|
||||
static void set_child(node_ptr header, node_ptr new_child, node_ptr new_parent, const bool link_left)
|
||||
static void set_child(node_ptr header, node_ptr new_child, node_ptr new_parent, const bool link_left) BOOST_NOEXCEPT
|
||||
{
|
||||
if(new_parent == header)
|
||||
NodeTraits::set_parent(header, new_child);
|
||||
@@ -1796,7 +1802,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
}
|
||||
|
||||
// rotate p to left (no header and p's parent fixup)
|
||||
static void rotate_left_no_parent_fix(node_ptr p, node_ptr p_right)
|
||||
static void rotate_left_no_parent_fix(node_ptr p, node_ptr p_right) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr p_right_left(NodeTraits::get_left(p_right));
|
||||
NodeTraits::set_right(p, p_right_left);
|
||||
@@ -1808,7 +1814,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
}
|
||||
|
||||
// rotate p to left (with header and p's parent fixup)
|
||||
static void rotate_left(node_ptr p, node_ptr p_right, node_ptr p_parent, node_ptr header)
|
||||
static void rotate_left(node_ptr p, node_ptr p_right, node_ptr p_parent, node_ptr header) BOOST_NOEXCEPT
|
||||
{
|
||||
const bool p_was_left(NodeTraits::get_left(p_parent) == p);
|
||||
rotate_left_no_parent_fix(p, p_right);
|
||||
@@ -1817,7 +1823,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
}
|
||||
|
||||
// rotate p to right (no header and p's parent fixup)
|
||||
static void rotate_right_no_parent_fix(node_ptr p, node_ptr p_left)
|
||||
static void rotate_right_no_parent_fix(node_ptr p, node_ptr p_left) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr p_left_right(NodeTraits::get_right(p_left));
|
||||
NodeTraits::set_left(p, p_left_right);
|
||||
@@ -1829,7 +1835,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
}
|
||||
|
||||
// rotate p to right (with header and p's parent fixup)
|
||||
static void rotate_right(node_ptr p, node_ptr p_left, node_ptr p_parent, node_ptr header)
|
||||
static void rotate_right(node_ptr p, node_ptr p_left, node_ptr p_parent, node_ptr header) BOOST_NOEXCEPT
|
||||
{
|
||||
const bool p_was_left(NodeTraits::get_left(p_parent) == p);
|
||||
rotate_right_no_parent_fix(p, p_left);
|
||||
@@ -1839,7 +1845,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
|
||||
private:
|
||||
|
||||
static void subtree_to_vine(node_ptr vine_tail, std::size_t &size)
|
||||
static void subtree_to_vine(node_ptr vine_tail, std::size_t &size) BOOST_NOEXCEPT
|
||||
{
|
||||
//Inspired by LibAVL:
|
||||
//It uses a clever optimization for trees with parent pointers.
|
||||
@@ -1866,7 +1872,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
size = len;
|
||||
}
|
||||
|
||||
static void compress_subtree(node_ptr scanner, std::size_t count)
|
||||
static void compress_subtree(node_ptr scanner, std::size_t count) BOOST_NOEXCEPT
|
||||
{
|
||||
while(count--){ //compress "count" spine nodes in the tree with pseudo-root scanner
|
||||
node_ptr child = NodeTraits::get_right(scanner);
|
||||
@@ -1883,7 +1889,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
}
|
||||
}
|
||||
|
||||
static void vine_to_subtree(node_ptr super_root, std::size_t count)
|
||||
static void vine_to_subtree(node_ptr super_root, std::size_t count) BOOST_NOEXCEPT
|
||||
{
|
||||
const std::size_t one_szt = 1u;
|
||||
std::size_t leaf_nodes = count + one_szt - std::size_t(one_szt << detail::floor_log2(count + one_szt));
|
||||
@@ -1910,10 +1916,10 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static node_ptr get_root(const node_ptr & node)
|
||||
static node_ptr get_root(node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT((!inited(node)));
|
||||
node_ptr x = NodeTraits::get_parent(node);
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT((!inited(n)));
|
||||
node_ptr x = NodeTraits::get_parent(n);
|
||||
if(x){
|
||||
while(!base_type::is_header(x)){
|
||||
x = NodeTraits::get_parent(x);
|
||||
@@ -1921,13 +1927,13 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
return x;
|
||||
}
|
||||
else{
|
||||
return node;
|
||||
return n;
|
||||
}
|
||||
}
|
||||
|
||||
template <class Cloner, class Disposer>
|
||||
static node_ptr clone_subtree
|
||||
(const const_node_ptr &source_parent, node_ptr target_parent
|
||||
(const_node_ptr source_parent, node_ptr target_parent
|
||||
, Cloner cloner, Disposer disposer
|
||||
, node_ptr &leftmost_out, node_ptr &rightmost_out
|
||||
)
|
||||
@@ -2002,7 +2008,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
}
|
||||
|
||||
template<class Disposer>
|
||||
static void dispose_subtree(node_ptr x, Disposer disposer)
|
||||
static void dispose_subtree(node_ptr x, Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
while (x){
|
||||
node_ptr save(NodeTraits::get_left(x));
|
||||
@@ -2053,23 +2059,23 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
|
||||
}
|
||||
|
||||
template<class Checker>
|
||||
static void check_subtree(const const_node_ptr& node, Checker checker, typename Checker::return_type& check_return)
|
||||
static void check_subtree(const_node_ptr n, Checker checker, typename Checker::return_type& check_return)
|
||||
{
|
||||
const_node_ptr left = NodeTraits::get_left(node);
|
||||
const_node_ptr right = NodeTraits::get_right(node);
|
||||
const_node_ptr left = NodeTraits::get_left(n);
|
||||
const_node_ptr right = NodeTraits::get_right(n);
|
||||
typename Checker::return_type check_return_left;
|
||||
typename Checker::return_type check_return_right;
|
||||
if (left)
|
||||
{
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_parent(left) == node);
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_parent(left) == n);
|
||||
check_subtree(left, checker, check_return_left);
|
||||
}
|
||||
if (right)
|
||||
{
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_parent(right) == node);
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_parent(right) == n);
|
||||
check_subtree(right, checker, check_return_right);
|
||||
}
|
||||
checker(node, check_return_left, check_return_right, check_return);
|
||||
checker(n, check_return_left, check_return_right, check_return);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#include <boost/intrusive/detail/algo_type.hpp>
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
@@ -67,7 +67,7 @@ class circular_list_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init(node_ptr this_node)
|
||||
static void init(node_ptr this_node) BOOST_NOEXCEPT
|
||||
{
|
||||
const node_ptr null_node = node_ptr();
|
||||
NodeTraits::set_next(this_node, null_node);
|
||||
@@ -80,7 +80,7 @@ class circular_list_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr &this_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool inited(const_node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ return !NodeTraits::get_next(this_node); }
|
||||
|
||||
//! <b>Effects</b>: Constructs an empty list, making this_node the only
|
||||
@@ -91,12 +91,21 @@ class circular_list_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init_header(node_ptr this_node)
|
||||
static void init_header(node_ptr this_node) BOOST_NOEXCEPT
|
||||
{
|
||||
NodeTraits::set_next(this_node, this_node);
|
||||
NodeTraits::set_previous(this_node, this_node);
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: Returns true if this_node_points to an empty list.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool is_empty(const_node_ptr this_node) BOOST_NOEXCEPT
|
||||
{
|
||||
return NodeTraits::get_next(this_node) == this_node;
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
|
||||
//!
|
||||
@@ -106,7 +115,7 @@ class circular_list_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr &this_node)
|
||||
static bool unique(const_node_ptr this_node) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr next = NodeTraits::get_next(this_node);
|
||||
return !next || next == this_node;
|
||||
@@ -120,7 +129,7 @@ class circular_list_algorithms
|
||||
//! <b>Complexity</b>: Linear
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static std::size_t count(const const_node_ptr &this_node)
|
||||
static std::size_t count(const_node_ptr this_node) BOOST_NOEXCEPT
|
||||
{
|
||||
std::size_t result = 0;
|
||||
const_node_ptr p = this_node;
|
||||
@@ -138,7 +147,7 @@ class circular_list_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr unlink(node_ptr this_node)
|
||||
static node_ptr unlink(node_ptr this_node) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr next(NodeTraits::get_next(this_node));
|
||||
node_ptr prev(NodeTraits::get_previous(this_node));
|
||||
@@ -154,7 +163,7 @@ class circular_list_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void unlink(node_ptr b, node_ptr e)
|
||||
static void unlink(node_ptr b, node_ptr e) BOOST_NOEXCEPT
|
||||
{
|
||||
if (b != e) {
|
||||
node_ptr prevb(NodeTraits::get_previous(b));
|
||||
@@ -170,7 +179,7 @@ class circular_list_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void link_before(node_ptr nxt_node, node_ptr this_node)
|
||||
static void link_before(node_ptr nxt_node, node_ptr this_node) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr prev(NodeTraits::get_previous(nxt_node));
|
||||
NodeTraits::set_previous(this_node, prev);
|
||||
@@ -189,7 +198,7 @@ class circular_list_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void link_after(node_ptr prev_node, node_ptr this_node)
|
||||
static void link_after(node_ptr prev_node, node_ptr this_node) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr next(NodeTraits::get_next(prev_node));
|
||||
NodeTraits::set_previous(this_node, prev_node);
|
||||
@@ -211,7 +220,7 @@ class circular_list_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void swap_nodes(node_ptr this_node, node_ptr other_node)
|
||||
static void swap_nodes(node_ptr this_node, node_ptr other_node) BOOST_NOEXCEPT
|
||||
{
|
||||
if (other_node == this_node)
|
||||
return;
|
||||
@@ -252,9 +261,9 @@ class circular_list_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void transfer(node_ptr p, node_ptr b, node_ptr e)
|
||||
static void transfer(node_ptr p, node_ptr b, node_ptr e) BOOST_NOEXCEPT
|
||||
{
|
||||
if (b != e) {
|
||||
if (b != e && p != b && p != e) {
|
||||
node_ptr prev_p(NodeTraits::get_previous(p));
|
||||
node_ptr prev_b(NodeTraits::get_previous(b));
|
||||
node_ptr prev_e(NodeTraits::get_previous(e));
|
||||
@@ -277,7 +286,7 @@ class circular_list_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void transfer(node_ptr p, node_ptr i)
|
||||
static void transfer(node_ptr p, node_ptr i) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr n(NodeTraits::get_next(i));
|
||||
if(n != p && i != p){
|
||||
@@ -298,7 +307,7 @@ class circular_list_algorithms
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: This function is linear time.
|
||||
static void reverse(node_ptr p)
|
||||
static void reverse(node_ptr p) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr f(NodeTraits::get_next(p));
|
||||
node_ptr i(NodeTraits::get_next(f)), e(p);
|
||||
@@ -316,7 +325,7 @@ class circular_list_algorithms
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of moved positions.
|
||||
static void move_backwards(node_ptr p, std::size_t n)
|
||||
static void move_backwards(node_ptr p, std::size_t n) BOOST_NOEXCEPT
|
||||
{
|
||||
//Null shift, nothing to do
|
||||
if(!n) return;
|
||||
@@ -336,7 +345,7 @@ class circular_list_algorithms
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of moved positions.
|
||||
static void move_forward(node_ptr p, std::size_t n)
|
||||
static void move_forward(node_ptr p, std::size_t n) BOOST_NOEXCEPT
|
||||
{
|
||||
//Null shift, nothing to do
|
||||
if(!n) return;
|
||||
@@ -359,12 +368,11 @@ class circular_list_algorithms
|
||||
//! <b>Complexity</b>: Linear
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static std::size_t distance(const const_node_ptr &f, const const_node_ptr &l)
|
||||
static std::size_t distance(const_node_ptr f, const_node_ptr l) BOOST_NOEXCEPT
|
||||
{
|
||||
const_node_ptr i(f);
|
||||
std::size_t result = 0;
|
||||
while(i != l){
|
||||
i = NodeTraits::get_next(i);
|
||||
while(f != l){
|
||||
f = NodeTraits::get_next(f);
|
||||
++result;
|
||||
}
|
||||
return result;
|
||||
@@ -397,7 +405,7 @@ class circular_list_algorithms
|
||||
new_f = cur;
|
||||
bcur = cur;
|
||||
cur = node_traits::get_next(cur);
|
||||
BOOST_TRY{
|
||||
BOOST_INTRUSIVE_TRY{
|
||||
//Main loop
|
||||
while(cur != end){
|
||||
if(pred(cur)){ //Might throw
|
||||
@@ -418,12 +426,12 @@ class circular_list_algorithms
|
||||
}
|
||||
}
|
||||
}
|
||||
BOOST_CATCH(...){
|
||||
BOOST_INTRUSIVE_CATCH(...){
|
||||
node_traits::set_next (last_to_remove, new_f);
|
||||
node_traits::set_previous(new_f, last_to_remove);
|
||||
BOOST_RETHROW;
|
||||
BOOST_INTRUSIVE_RETHROW;
|
||||
}
|
||||
BOOST_CATCH_END
|
||||
BOOST_INTRUSIVE_CATCH_END
|
||||
node_traits::set_next(last_to_remove, new_f);
|
||||
node_traits::set_previous(new_f, last_to_remove);
|
||||
break;
|
||||
@@ -435,14 +443,14 @@ class circular_list_algorithms
|
||||
}
|
||||
|
||||
private:
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void swap_prev(node_ptr this_node, node_ptr other_node)
|
||||
static void swap_prev(node_ptr this_node, node_ptr other_node) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr temp(NodeTraits::get_previous(this_node));
|
||||
NodeTraits::set_previous(this_node, NodeTraits::get_previous(other_node));
|
||||
NodeTraits::set_previous(other_node, temp);
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void swap_next(node_ptr this_node, node_ptr other_node)
|
||||
static void swap_next(node_ptr this_node, node_ptr other_node) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr temp(NodeTraits::get_next(this_node));
|
||||
NodeTraits::set_next(this_node, NodeTraits::get_next(other_node));
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/common_slist_algorithms.hpp>
|
||||
#include <boost/intrusive/detail/uncast.hpp>
|
||||
#include <boost/intrusive/detail/algo_type.hpp>
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
@@ -72,7 +73,7 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void init(node_ptr this_node);
|
||||
static void init(node_ptr this_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
|
||||
//!
|
||||
@@ -83,7 +84,7 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static bool unique(const_node_ptr this_node);
|
||||
static bool unique(const_node_ptr this_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns true is "this_node" has the same state as
|
||||
//! if it was inited using "init(node_ptr)"
|
||||
@@ -91,7 +92,7 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static bool inited(const_node_ptr this_node);
|
||||
static bool inited(const_node_ptr this_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: prev_node must be in a circular list or be an empty circular list.
|
||||
//!
|
||||
@@ -100,7 +101,7 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void unlink_after(node_ptr prev_node);
|
||||
static void unlink_after(node_ptr prev_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: prev_node and last_node must be in a circular list
|
||||
//! or be an empty circular list.
|
||||
@@ -110,7 +111,7 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void unlink_after(node_ptr prev_node, node_ptr last_node);
|
||||
static void unlink_after(node_ptr prev_node, node_ptr last_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: prev_node must be a node of a circular list.
|
||||
//!
|
||||
@@ -119,7 +120,7 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void link_after(node_ptr prev_node, node_ptr this_node);
|
||||
static void link_after(node_ptr prev_node, node_ptr this_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: b and e must be nodes of the same circular list or an empty range.
|
||||
//! and p must be a node of a different circular list.
|
||||
@@ -130,7 +131,11 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void transfer_after(node_ptr p, node_ptr b, node_ptr e);
|
||||
static void transfer_after(node_ptr p, node_ptr b, node_ptr e) BOOST_NOEXCEPT;
|
||||
|
||||
#else
|
||||
|
||||
using base_t::transfer_after;
|
||||
|
||||
#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
|
||||
@@ -141,9 +146,44 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init_header(node_ptr this_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init_header(node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ NodeTraits::set_next(this_node, this_node); }
|
||||
|
||||
//! <b>Requires</b>: 'p' is the first node of a list.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns a pointer to a node that represents the "end" (one past end) node
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant time.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr end_node(const_node_ptr p) BOOST_NOEXCEPT
|
||||
{ return detail::uncast(p); }
|
||||
|
||||
//! <b>Effects</b>: Returns true if this_node_points to an empty list.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool is_empty(const_node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ return NodeTraits::get_next(this_node) == this_node; }
|
||||
|
||||
//! <b>Effects</b>: Returns true if this_node points to a sentinel node.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool is_sentinel(const_node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ return NodeTraits::get_next(this_node) == node_ptr(); }
|
||||
|
||||
//! <b>Effects</b>: Marks this node as a "sentinel" node, a special state that is different from "empty",
|
||||
//! that can be used to mark a special state of the list
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_sentinel(node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ NodeTraits::set_next(this_node, node_ptr()); }
|
||||
|
||||
//! <b>Requires</b>: this_node and prev_init_node must be in the same circular list.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the previous node of this_node in the circular list starting.
|
||||
@@ -153,7 +193,7 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Linear to the number of elements between prev_init_node and this_node.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_node(const node_ptr &prev_init_node, const node_ptr &this_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_node(node_ptr prev_init_node, node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ return base_t::get_previous_node(prev_init_node, this_node); }
|
||||
|
||||
//! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
|
||||
@@ -163,7 +203,7 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Linear to the number of elements in the circular list.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_node(const node_ptr & this_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_node(node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ return base_t::get_previous_node(this_node, this_node); }
|
||||
|
||||
//! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
|
||||
@@ -173,7 +213,7 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Linear to the number of elements in the circular list.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_previous_node(const node_ptr & this_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_previous_node(node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ return get_previous_previous_node(this_node, this_node); }
|
||||
|
||||
//! <b>Requires</b>: this_node and p must be in the same circular list.
|
||||
@@ -185,7 +225,7 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Linear to the number of elements in the circular list.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static node_ptr get_previous_previous_node(node_ptr p, const node_ptr & this_node)
|
||||
static node_ptr get_previous_previous_node(node_ptr p, node_ptr this_node) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr p_next = NodeTraits::get_next(p);
|
||||
node_ptr p_next_next = NodeTraits::get_next(p_next);
|
||||
@@ -205,7 +245,7 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Linear
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static std::size_t count(const const_node_ptr & this_node)
|
||||
static std::size_t count(const_node_ptr this_node) BOOST_NOEXCEPT
|
||||
{
|
||||
std::size_t result = 0;
|
||||
const_node_ptr p = this_node;
|
||||
@@ -223,7 +263,7 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Linear to the number of elements in the circular list
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void unlink(node_ptr this_node)
|
||||
static void unlink(node_ptr this_node) BOOST_NOEXCEPT
|
||||
{
|
||||
if(NodeTraits::get_next(this_node))
|
||||
base_t::unlink_after(get_previous_node(this_node));
|
||||
@@ -236,7 +276,7 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Linear to the number of elements in the circular list.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void link_before (node_ptr nxt_node, node_ptr this_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void link_before (node_ptr nxt_node, node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ base_t::link_after(get_previous_node(nxt_node), this_node); }
|
||||
|
||||
//! <b>Requires</b>: this_node and other_node must be nodes inserted
|
||||
@@ -249,7 +289,7 @@ class circular_slist_algorithms
|
||||
//! <b>Complexity</b>: Linear to number of elements of both lists
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void swap_nodes(node_ptr this_node, node_ptr other_node)
|
||||
static void swap_nodes(node_ptr this_node, node_ptr other_node) BOOST_NOEXCEPT
|
||||
{
|
||||
if (other_node == this_node)
|
||||
return;
|
||||
@@ -275,7 +315,7 @@ class circular_slist_algorithms
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: This function is linear to the contained elements.
|
||||
static void reverse(node_ptr p)
|
||||
static void reverse(node_ptr p) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr i = NodeTraits::get_next(p), e(p);
|
||||
for (;;) {
|
||||
@@ -294,7 +334,7 @@ class circular_slist_algorithms
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
|
||||
static node_ptr move_backwards(node_ptr p, std::size_t n)
|
||||
static node_ptr move_backwards(node_ptr p, std::size_t n) BOOST_NOEXCEPT
|
||||
{
|
||||
//Null shift, nothing to do
|
||||
if(!n) return node_ptr();
|
||||
@@ -346,7 +386,7 @@ class circular_slist_algorithms
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
|
||||
static node_ptr move_forward(node_ptr p, std::size_t n)
|
||||
static node_ptr move_forward(node_ptr p, std::size_t n) BOOST_NOEXCEPT
|
||||
{
|
||||
//Null shift, nothing to do
|
||||
if(!n) return node_ptr();
|
||||
@@ -386,6 +426,35 @@ class circular_slist_algorithms
|
||||
base_t::link_after(new_last, p);
|
||||
return new_last;
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: other must be a list and p must be a node of a different list.
|
||||
//!
|
||||
//! <b>Effects</b>: Transfers all nodes from other after p in p's list.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void transfer_after(node_ptr p, node_ptr other) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr other_last((get_previous_node)(other));
|
||||
base_t::transfer_after(p, other, other_last);
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: "disposer" must be an object function
|
||||
//! taking a node_ptr parameter and shouldn't throw.
|
||||
//!
|
||||
//! <b>Effects</b>: Unlinks all nodes reachable from p (but not p) and calls
|
||||
//! <tt>void disposer::operator()(node_ptr)</tt> for every node of the list
|
||||
//! where p is linked.
|
||||
//!
|
||||
//! <b>Returns</b>: The number of disposed nodes
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of element of the list.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
template<class Disposer>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static std::size_t detach_and_dispose(node_ptr p, Disposer disposer) BOOST_NOEXCEPT
|
||||
{ return base_t::unlink_after_and_dispose(p, p, disposer); }
|
||||
};
|
||||
|
||||
/// @cond
|
||||
|
||||
@@ -52,18 +52,18 @@ struct derivation_value_traits
|
||||
pointer_traits<const_pointer>::reference const_reference;
|
||||
static const link_mode_type link_mode = LinkMode;
|
||||
|
||||
static node_ptr to_node_ptr(reference value)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr to_node_ptr(reference value) BOOST_NOEXCEPT
|
||||
{ return node_ptr(&value); }
|
||||
|
||||
static const_node_ptr to_node_ptr(const_reference value)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_node_ptr to_node_ptr(const_reference value) BOOST_NOEXCEPT
|
||||
{ return node_ptr(&value); }
|
||||
|
||||
static pointer to_value_ptr(const node_ptr &n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
return pointer_traits<pointer>::pointer_to(static_cast<reference>(*n));
|
||||
}
|
||||
|
||||
static const_pointer to_value_ptr(const const_node_ptr &n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const_node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
return pointer_traits<const_pointer>::pointer_to(static_cast<const_reference>(*n));
|
||||
}
|
||||
|
||||
@@ -49,13 +49,13 @@ struct any_list_node_traits
|
||||
typedef typename node::node_ptr node_ptr;
|
||||
typedef typename node::const_node_ptr const_node_ptr;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const_node_ptr n)
|
||||
{ return n->node_ptr_1; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
|
||||
{ n->node_ptr_1 = next; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(const_node_ptr n)
|
||||
{ return n->node_ptr_2; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_previous(node_ptr n, node_ptr prev)
|
||||
@@ -70,7 +70,7 @@ struct any_slist_node_traits
|
||||
typedef typename node::node_ptr node_ptr;
|
||||
typedef typename node::const_node_ptr const_node_ptr;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const_node_ptr n)
|
||||
{ return n->node_ptr_1; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
|
||||
@@ -90,22 +90,22 @@ struct any_unordered_node_traits
|
||||
static const bool store_hash = true;
|
||||
static const bool optimize_multikey = true;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const_node_ptr n)
|
||||
{ return n->node_ptr_1; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
|
||||
{ n->node_ptr_1 = next; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_prev_in_group(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_prev_in_group(const_node_ptr n)
|
||||
{ return n->node_ptr_2; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_prev_in_group(node_ptr n, node_ptr prev)
|
||||
{ n->node_ptr_2 = prev; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static std::size_t get_hash(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static std::size_t get_hash(const_node_ptr n)
|
||||
{ return n->size_t_1; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_hash(const node_ptr & n, std::size_t h)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_hash(node_ptr n, std::size_t h)
|
||||
{ n->size_t_1 = h; }
|
||||
};
|
||||
|
||||
@@ -119,28 +119,28 @@ struct any_rbtree_node_traits
|
||||
|
||||
typedef std::size_t color;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const_node_ptr n)
|
||||
{ return n->node_ptr_1; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ n->node_ptr_1 = p; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const_node_ptr n)
|
||||
{ return n->node_ptr_2; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->node_ptr_2 = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const_node_ptr n)
|
||||
{ return n->node_ptr_3; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
{ n->node_ptr_3 = r; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color get_color(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color get_color(const_node_ptr n)
|
||||
{ return n->size_t_1; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_color(const node_ptr & n, color c)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_color(node_ptr n, color c)
|
||||
{ n->size_t_1 = c; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color black()
|
||||
@@ -160,28 +160,28 @@ struct any_avltree_node_traits
|
||||
|
||||
typedef std::size_t balance;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const_node_ptr n)
|
||||
{ return n->node_ptr_1; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ n->node_ptr_1 = p; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const_node_ptr n)
|
||||
{ return n->node_ptr_2; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->node_ptr_2 = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const_node_ptr n)
|
||||
{ return n->node_ptr_3; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
{ n->node_ptr_3 = r; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const_node_ptr n)
|
||||
{ return n->size_t_1; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_balance(const node_ptr & n, balance b)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_balance(node_ptr n, balance b)
|
||||
{ n->size_t_1 = b; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static balance negative()
|
||||
@@ -202,19 +202,19 @@ struct any_tree_node_traits
|
||||
typedef typename node::node_ptr node_ptr;
|
||||
typedef typename node::const_node_ptr const_node_ptr;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const_node_ptr n)
|
||||
{ return n->node_ptr_1; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ n->node_ptr_1 = p; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const_node_ptr n)
|
||||
{ return n->node_ptr_2; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->node_ptr_2 = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const_node_ptr n)
|
||||
{ return n->node_ptr_3; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
@@ -243,7 +243,7 @@ class any_algorithms
|
||||
typedef typename node::const_node_ptr const_node_ptr;
|
||||
typedef any_node_traits<VoidPointer> node_traits;
|
||||
|
||||
//! <b>Requires</b>: node must not be part of any tree.
|
||||
//! <b>Requires</b>: 'n' must not be part of any tree.
|
||||
//!
|
||||
//! <b>Effects</b>: After the function unique(node) == true.
|
||||
//!
|
||||
@@ -252,27 +252,27 @@ class any_algorithms
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init(const node_ptr & node)
|
||||
{ node->node_ptr_1 = node_ptr(); };
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init(node_ptr n) BOOST_NOEXCEPT
|
||||
{ n->node_ptr_1 = node_ptr(); };
|
||||
|
||||
//! <b>Effects</b>: Returns true if node is in the same state as if called init(node)
|
||||
//! <b>Effects</b>: Returns true if 'n' is in the same state as if called init(node)
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr & node)
|
||||
{ return !node->node_ptr_1; };
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool inited(const_node_ptr n)
|
||||
{ return !n->node_ptr_1; };
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr & node)
|
||||
{ return !node->node_ptr_1; }
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool unique(const_node_ptr n) BOOST_NOEXCEPT
|
||||
{ return !n->node_ptr_1; }
|
||||
|
||||
static void unlink(const node_ptr &)
|
||||
static void unlink(node_ptr)
|
||||
{
|
||||
//Auto-unlink hooks and unlink() are not available for any hooks
|
||||
any_algorithms<VoidPointer>::template function_not_available_for_any_hooks<node_ptr>();
|
||||
}
|
||||
|
||||
static void swap_nodes(const node_ptr &, const node_ptr &)
|
||||
static void swap_nodes(node_ptr, node_ptr)
|
||||
{
|
||||
//Any nodes have no swap_nodes capability because they don't know
|
||||
//what algorithm they must use to unlink the node from the container
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#include <boost/move/detail/placement_new.hpp>
|
||||
#include <boost/move/detail/force_ptr.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
@@ -53,20 +55,20 @@ class array_initializer
|
||||
{
|
||||
char *init_buf = (char*)rawbuf;
|
||||
std::size_t i = 0;
|
||||
BOOST_TRY{
|
||||
BOOST_INTRUSIVE_TRY{
|
||||
for(; i != N; ++i){
|
||||
new(init_buf)T(init);
|
||||
::new(init_buf, boost_move_new_t()) T(init);
|
||||
init_buf += sizeof(T);
|
||||
}
|
||||
}
|
||||
BOOST_CATCH(...){
|
||||
BOOST_INTRUSIVE_CATCH(...){
|
||||
while(i--){
|
||||
init_buf -= sizeof(T);
|
||||
((T*)init_buf)->~T();
|
||||
move_detail::force_ptr<T*>(init_buf)->~T();
|
||||
}
|
||||
BOOST_RETHROW;
|
||||
BOOST_INTRUSIVE_RETHROW;
|
||||
}
|
||||
BOOST_CATCH_END
|
||||
BOOST_INTRUSIVE_CATCH_END
|
||||
}
|
||||
|
||||
operator T* ()
|
||||
@@ -80,7 +82,7 @@ class array_initializer
|
||||
char *init_buf = (char*)rawbuf + N*sizeof(T);
|
||||
for(std::size_t i = 0; i != N; ++i){
|
||||
init_buf -= sizeof(T);
|
||||
((T*)init_buf)->~T();
|
||||
move_detail::force_ptr<T*>(init_buf)->~T();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,40 +69,40 @@ struct default_avltree_node_traits_impl
|
||||
|
||||
typedef typename node::balance balance;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const_node_ptr n)
|
||||
{ return n->parent_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(node_ptr n)
|
||||
{ return n->parent_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ n->parent_ = p; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const_node_ptr n)
|
||||
{ return n->left_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(node_ptr n)
|
||||
{ return n->left_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->left_ = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const_node_ptr n)
|
||||
{ return n->right_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(node_ptr n)
|
||||
{ return n->right_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
{ n->right_ = r; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const_node_ptr n)
|
||||
{ return n->balance_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(node_ptr n)
|
||||
{ return n->balance_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_balance(const node_ptr & n, balance b)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_balance(node_ptr n, balance b)
|
||||
{ n->balance_ = b; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static balance negative()
|
||||
@@ -127,28 +127,28 @@ struct compact_avltree_node_traits_impl
|
||||
|
||||
typedef pointer_plus_bits<node_ptr, 2> ptr_bit;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const_node_ptr n)
|
||||
{ return ptr_bit::get_pointer(n->parent_); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ ptr_bit::set_pointer(n->parent_, p); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const_node_ptr n)
|
||||
{ return n->left_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->left_ = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const_node_ptr n)
|
||||
{ return n->right_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
{ n->right_ = r; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const_node_ptr n)
|
||||
{ return (balance)ptr_bit::get_bits(n->parent_); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_balance(const node_ptr & n, balance b)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_balance(node_ptr n, balance b)
|
||||
{ ptr_bit::set_bits(n->parent_, (std::size_t)b); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static balance negative()
|
||||
|
||||
@@ -35,21 +35,20 @@ class bstree_algorithms_base
|
||||
typedef typename NodeTraits::node_ptr node_ptr;
|
||||
typedef typename NodeTraits::const_node_ptr const_node_ptr;
|
||||
|
||||
//! <b>Requires</b>: 'node' is a node from the tree except the header.
|
||||
//! <b>Requires</b>: 'n' is a node from the tree except the header.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the next node of the tree.
|
||||
//!
|
||||
//! <b>Complexity</b>: Average constant time.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static node_ptr next_node(const node_ptr & node)
|
||||
static node_ptr next_node(node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr const n_right(NodeTraits::get_right(node));
|
||||
node_ptr const n_right(NodeTraits::get_right(n));
|
||||
if(n_right){
|
||||
return minimum(n_right);
|
||||
}
|
||||
else {
|
||||
node_ptr n(node);
|
||||
node_ptr p(NodeTraits::get_parent(n));
|
||||
while(n == NodeTraits::get_right(p)){
|
||||
n = p;
|
||||
@@ -59,24 +58,23 @@ class bstree_algorithms_base
|
||||
}
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: 'node' is a node from the tree except the leftmost node.
|
||||
//! <b>Requires</b>: 'n' is a node from the tree except the leftmost node.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the previous node of the tree.
|
||||
//!
|
||||
//! <b>Complexity</b>: Average constant time.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static node_ptr prev_node(const node_ptr & node)
|
||||
static node_ptr prev_node(node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
if(is_header(node)){
|
||||
//return NodeTraits::get_right(node);
|
||||
return maximum(NodeTraits::get_parent(node));
|
||||
if(is_header(n)){
|
||||
return NodeTraits::get_right(n);
|
||||
}
|
||||
else if(NodeTraits::get_left(node)){
|
||||
return maximum(NodeTraits::get_left(node));
|
||||
else if(NodeTraits::get_left(n)){
|
||||
return maximum(NodeTraits::get_left(n));
|
||||
}
|
||||
else {
|
||||
node_ptr p(node);
|
||||
node_ptr p(n);
|
||||
node_ptr x = NodeTraits::get_parent(p);
|
||||
while(p == NodeTraits::get_left(x)){
|
||||
p = x;
|
||||
@@ -86,38 +84,38 @@ class bstree_algorithms_base
|
||||
}
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: 'node' is a node of a tree but not the header.
|
||||
//! <b>Requires</b>: 'n' is a node of a tree but not the header.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the minimum node of the subtree starting at p.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic to the size of the subtree.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static node_ptr minimum(node_ptr node)
|
||||
static node_ptr minimum(node_ptr n)
|
||||
{
|
||||
for(node_ptr p_left = NodeTraits::get_left(node)
|
||||
for(node_ptr p_left = NodeTraits::get_left(n)
|
||||
;p_left
|
||||
;p_left = NodeTraits::get_left(node)){
|
||||
node = p_left;
|
||||
;p_left = NodeTraits::get_left(n)){
|
||||
n = p_left;
|
||||
}
|
||||
return node;
|
||||
return n;
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: 'node' is a node of a tree but not the header.
|
||||
//! <b>Requires</b>: 'n' is a node of a tree but not the header.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the maximum node of the subtree starting at p.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic to the size of the subtree.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static node_ptr maximum(node_ptr node)
|
||||
static node_ptr maximum(node_ptr n)
|
||||
{
|
||||
for(node_ptr p_right = NodeTraits::get_right(node)
|
||||
for(node_ptr p_right = NodeTraits::get_right(n)
|
||||
;p_right
|
||||
;p_right = NodeTraits::get_right(node)){
|
||||
node = p_right;
|
||||
;p_right = NodeTraits::get_right(n)){
|
||||
n = p_right;
|
||||
}
|
||||
return node;
|
||||
return n;
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: p is a node of a tree.
|
||||
@@ -127,7 +125,7 @@ class bstree_algorithms_base
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static bool is_header(const const_node_ptr & p)
|
||||
static bool is_header(const_node_ptr p) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr p_left (NodeTraits::get_left(p));
|
||||
node_ptr p_right(NodeTraits::get_right(p));
|
||||
@@ -144,37 +142,37 @@ class bstree_algorithms_base
|
||||
return false;
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: 'node' is a node of the tree or a header node.
|
||||
//! <b>Requires</b>: 'n' is a node of the tree or a header node.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the header of the tree.
|
||||
//!
|
||||
//! <b>Complexity</b>: Logarithmic.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static node_ptr get_header(const const_node_ptr & node)
|
||||
static node_ptr get_header(const_node_ptr n)
|
||||
{
|
||||
node_ptr n(detail::uncast(node));
|
||||
node_ptr p(NodeTraits::get_parent(node));
|
||||
//If p is null, then n is the header of an empty tree
|
||||
node_ptr nn(detail::uncast(n));
|
||||
node_ptr p(NodeTraits::get_parent(n));
|
||||
//If p is null, then nn is the header of an empty tree
|
||||
if(p){
|
||||
//Non-empty tree, check if n is neither root nor header
|
||||
//Non-empty tree, check if nn is neither root nor header
|
||||
node_ptr pp(NodeTraits::get_parent(p));
|
||||
//If granparent is not equal to n, then n is neither root nor header,
|
||||
//If granparent is not equal to nn, then nn is neither root nor header,
|
||||
//the try the fast path
|
||||
if(n != pp){
|
||||
if(nn != pp){
|
||||
do{
|
||||
n = p;
|
||||
nn = p;
|
||||
p = pp;
|
||||
pp = NodeTraits::get_parent(pp);
|
||||
}while(n != pp);
|
||||
n = p;
|
||||
}while(nn != pp);
|
||||
nn = p;
|
||||
}
|
||||
//Check if n is root or header when size() > 0
|
||||
else if(!bstree_algorithms_base::is_header(n)){
|
||||
n = p;
|
||||
//Check if nn is root or header when size() > 0
|
||||
else if(!bstree_algorithms_base::is_header(nn)){
|
||||
nn = p;
|
||||
}
|
||||
}
|
||||
return n;
|
||||
return nn;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/intrusive/detail/algo_type.hpp>
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
@@ -40,7 +40,7 @@ class common_slist_algorithms
|
||||
typedef typename NodeTraits::const_node_ptr const_node_ptr;
|
||||
typedef NodeTraits node_traits;
|
||||
|
||||
static node_ptr get_previous_node(node_ptr p, const node_ptr & this_node)
|
||||
static node_ptr get_previous_node(node_ptr p, node_ptr this_node)
|
||||
{
|
||||
for( node_ptr p_next
|
||||
; this_node != (p_next = NodeTraits::get_next(p))
|
||||
@@ -52,41 +52,41 @@ class common_slist_algorithms
|
||||
return p;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init(node_ptr this_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init(node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ NodeTraits::set_next(this_node, node_ptr()); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr & this_node)
|
||||
static bool unique(const_node_ptr this_node) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr next = NodeTraits::get_next(this_node);
|
||||
return !next || next == this_node;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr & this_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool inited(const_node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ return !NodeTraits::get_next(this_node); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(node_ptr prev_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(node_ptr prev_node) BOOST_NOEXCEPT
|
||||
{
|
||||
const_node_ptr this_node(NodeTraits::get_next(prev_node));
|
||||
NodeTraits::set_next(prev_node, NodeTraits::get_next(this_node));
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(node_ptr prev_node, node_ptr last_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(node_ptr prev_node, node_ptr last_node) BOOST_NOEXCEPT
|
||||
{ NodeTraits::set_next(prev_node, last_node); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void link_after(node_ptr prev_node, node_ptr this_node)
|
||||
static void link_after(node_ptr prev_node, node_ptr this_node) BOOST_NOEXCEPT
|
||||
{
|
||||
NodeTraits::set_next(this_node, NodeTraits::get_next(prev_node));
|
||||
NodeTraits::set_next(prev_node, this_node);
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void incorporate_after(node_ptr bp, node_ptr b, node_ptr be)
|
||||
static void incorporate_after(node_ptr bp, node_ptr b, node_ptr be) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr p(NodeTraits::get_next(bp));
|
||||
NodeTraits::set_next(bp, b);
|
||||
NodeTraits::set_next(be, p);
|
||||
}
|
||||
|
||||
static void transfer_after(node_ptr bp, node_ptr bb, node_ptr be)
|
||||
static void transfer_after(node_ptr bp, node_ptr bb, node_ptr be) BOOST_NOEXCEPT
|
||||
{
|
||||
if (bp != bb && bp != be && bb != be) {
|
||||
node_ptr next_b = NodeTraits::get_next(bb);
|
||||
@@ -126,7 +126,7 @@ class common_slist_algorithms
|
||||
new_f = cur;
|
||||
bcur = cur;
|
||||
cur = node_traits::get_next(cur);
|
||||
BOOST_TRY{
|
||||
BOOST_INTRUSIVE_TRY{
|
||||
//Main loop
|
||||
while(cur != end){
|
||||
if(pred(cur)){ //Might throw
|
||||
@@ -145,11 +145,11 @@ class common_slist_algorithms
|
||||
}
|
||||
}
|
||||
}
|
||||
BOOST_CATCH(...){
|
||||
BOOST_INTRUSIVE_CATCH(...){
|
||||
node_traits::set_next(last_to_remove, new_f);
|
||||
BOOST_RETHROW;
|
||||
BOOST_INTRUSIVE_RETHROW;
|
||||
}
|
||||
BOOST_CATCH_END
|
||||
BOOST_INTRUSIVE_CATCH_END
|
||||
node_traits::set_next(last_to_remove, new_f);
|
||||
break;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ class common_slist_algorithms
|
||||
//! <b>Complexity</b>: Linear
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static std::size_t distance(const const_node_ptr &f, const const_node_ptr &l)
|
||||
static std::size_t distance(const_node_ptr f, const_node_ptr l) BOOST_NOEXCEPT
|
||||
{
|
||||
const_node_ptr i(f);
|
||||
std::size_t result = 0;
|
||||
@@ -177,6 +177,75 @@ class common_slist_algorithms
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: "disposer" must be an object function
|
||||
//! taking a node_ptr parameter and shouldn't throw.
|
||||
//!
|
||||
//! <b>Effects</b>: Calls
|
||||
//! <tt>void disposer::operator()(node_ptr)</tt> for every node of the list
|
||||
//! [p, e).
|
||||
//!
|
||||
//! <b>Returns</b>: The number of unlinked/disposed nodes
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of element of the list.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
template<class Disposer>
|
||||
static std::size_t unlink_after_and_dispose(node_ptr bb, node_ptr e, Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
std::size_t n = 0u;
|
||||
node_ptr i = node_traits::get_next(bb);
|
||||
while (i != e) {
|
||||
node_ptr to_erase(i);
|
||||
i = node_traits::get_next(i);
|
||||
disposer(to_erase);
|
||||
++n;
|
||||
}
|
||||
node_traits::set_next(bb, e);
|
||||
return n;
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: "disposer" must be an object function
|
||||
//! taking a node_ptr parameter and shouldn't throw.
|
||||
//!
|
||||
//! <b>Effects</b>: Calls
|
||||
//! <tt>void disposer::operator()(node_ptr)</tt> for every node of the list
|
||||
//! after p (but not for p). Works for circular or linear lists
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of element of the list.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
template<class Disposer>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void unlink_after_and_dispose(node_ptr bb, Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr i = node_traits::get_next(bb);
|
||||
node_traits::set_next(bb, node_traits::get_next(i));
|
||||
disposer(i);
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: "disposer" must be an object function
|
||||
//! taking a node_ptr parameter and shouldn't throw.
|
||||
//!
|
||||
//! <b>Effects</b>: Unlinks all nodes reachable from p (but not p) and calls
|
||||
//! <tt>void disposer::operator()(node_ptr)</tt> for every node of the list
|
||||
//! where p is linked.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of element of the list.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
template<class Disposer>
|
||||
static std::size_t detach_and_dispose(node_ptr p, Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
std::size_t n = 0;
|
||||
node_ptr i = node_traits::get_next(p);
|
||||
while ( i != p || i != node_ptr() ) {
|
||||
node_ptr to_erase(i);
|
||||
i = node_traits::get_next(i);
|
||||
disposer(to_erase);
|
||||
}
|
||||
node_traits::set_next(p, i);
|
||||
return n;
|
||||
}
|
||||
};
|
||||
|
||||
/// @endcond
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#ifdef BOOST_MSVC
|
||||
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4619) // there is no warning number 'XXXX'
|
||||
#pragma warning (disable : 4275) // non DLL-interface classkey "identifier" used as base for DLL-interface classkey "identifier"
|
||||
#pragma warning (disable : 4251) // "identifier" : class "type" needs to have dll-interface to be used by clients of class "type2"
|
||||
#pragma warning (disable : 4675) // "method" should be declared "static" and have exactly one parameter
|
||||
|
||||
@@ -47,7 +47,7 @@ struct default_header_holder : public NodeTraits::node
|
||||
{ return pointer_traits< node_ptr >::pointer_to(*static_cast< node* >(this)); }
|
||||
|
||||
// (unsafe) downcast used to implement container-from-iterator
|
||||
BOOST_INTRUSIVE_FORCEINLINE static default_header_holder* get_holder(const node_ptr &p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static default_header_holder* get_holder(node_ptr p)
|
||||
{ return static_cast< default_header_holder* >(boost::movelib::to_raw_pointer(p)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ struct empty_node_checker
|
||||
|
||||
struct return_type {};
|
||||
|
||||
void operator () (const const_node_ptr&, const return_type&, const return_type&, return_type&) {}
|
||||
void operator () (const_node_ptr, const return_type&, const return_type&, return_type&) {}
|
||||
};
|
||||
|
||||
} //namespace detail{
|
||||
|
||||
@@ -52,37 +52,6 @@ class exception_disposer
|
||||
}
|
||||
};
|
||||
|
||||
template<class Container, class Disposer, class SizeType>
|
||||
class exception_array_disposer
|
||||
{
|
||||
Container *cont_;
|
||||
Disposer &disp_;
|
||||
SizeType &constructed_;
|
||||
|
||||
exception_array_disposer(const exception_array_disposer&);
|
||||
exception_array_disposer &operator=(const exception_array_disposer&);
|
||||
|
||||
public:
|
||||
|
||||
exception_array_disposer
|
||||
(Container &cont, Disposer &disp, SizeType &constructed)
|
||||
: cont_(&cont), disp_(disp), constructed_(constructed)
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void release()
|
||||
{ cont_ = 0; }
|
||||
|
||||
~exception_array_disposer()
|
||||
{
|
||||
SizeType n = constructed_;
|
||||
if(cont_){
|
||||
while(n--){
|
||||
cont_[n].clear_and_dispose(disp_);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
} //namespace detail{
|
||||
} //namespace intrusive{
|
||||
} //namespace boost{
|
||||
|
||||
@@ -41,7 +41,7 @@ struct link_dispatch
|
||||
{};
|
||||
|
||||
template<class Hook>
|
||||
void destructor_impl(Hook &hook, detail::link_dispatch<safe_link>)
|
||||
BOOST_INTRUSIVE_FORCEINLINE void destructor_impl(Hook &hook, detail::link_dispatch<safe_link>)
|
||||
{ //If this assertion raises, you might have destroyed an object
|
||||
//while it was still inserted in a container that is alive.
|
||||
//If so, remove the object from the container before destroying it.
|
||||
@@ -49,11 +49,11 @@ void destructor_impl(Hook &hook, detail::link_dispatch<safe_link>)
|
||||
}
|
||||
|
||||
template<class Hook>
|
||||
void destructor_impl(Hook &hook, detail::link_dispatch<auto_unlink>)
|
||||
BOOST_INTRUSIVE_FORCEINLINE void destructor_impl(Hook &hook, detail::link_dispatch<auto_unlink>)
|
||||
{ hook.unlink(); }
|
||||
|
||||
template<class Hook>
|
||||
void destructor_impl(Hook &, detail::link_dispatch<normal_link>)
|
||||
BOOST_INTRUSIVE_FORCEINLINE void destructor_impl(Hook &, detail::link_dispatch<normal_link>)
|
||||
{}
|
||||
|
||||
} //namespace detail {
|
||||
@@ -161,30 +161,30 @@ class generic_hook
|
||||
< NodeTraits
|
||||
, Tag, LinkMode, BaseHookType> hooktags;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr this_ptr()
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr this_ptr() BOOST_NOEXCEPT
|
||||
{ return pointer_traits<node_ptr>::pointer_to(static_cast<node&>(*this)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_node_ptr this_ptr() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_node_ptr this_ptr() const BOOST_NOEXCEPT
|
||||
{ return pointer_traits<const_node_ptr>::pointer_to(static_cast<const node&>(*this)); }
|
||||
|
||||
public:
|
||||
/// @endcond
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE generic_hook()
|
||||
BOOST_INTRUSIVE_FORCEINLINE generic_hook() BOOST_NOEXCEPT
|
||||
{
|
||||
if(hooktags::safemode_or_autounlink){
|
||||
node_algorithms::init(this->this_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE generic_hook(const generic_hook& )
|
||||
BOOST_INTRUSIVE_FORCEINLINE generic_hook(const generic_hook& ) BOOST_NOEXCEPT
|
||||
{
|
||||
if(hooktags::safemode_or_autounlink){
|
||||
node_algorithms::init(this->this_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE generic_hook& operator=(const generic_hook& )
|
||||
BOOST_INTRUSIVE_FORCEINLINE generic_hook& operator=(const generic_hook& ) BOOST_NOEXCEPT
|
||||
{ return *this; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE ~generic_hook()
|
||||
@@ -193,20 +193,20 @@ class generic_hook
|
||||
(*this, detail::link_dispatch<hooktags::link_mode>());
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void swap_nodes(generic_hook &other)
|
||||
BOOST_INTRUSIVE_FORCEINLINE void swap_nodes(generic_hook &other) BOOST_NOEXCEPT
|
||||
{
|
||||
node_algorithms::swap_nodes
|
||||
(this->this_ptr(), other.this_ptr());
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool is_linked() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool is_linked() const BOOST_NOEXCEPT
|
||||
{
|
||||
//is_linked() can be only used in safe-mode or auto-unlink
|
||||
BOOST_STATIC_ASSERT(( hooktags::safemode_or_autounlink ));
|
||||
return !node_algorithms::unique(this->this_ptr());
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void unlink()
|
||||
BOOST_INTRUSIVE_FORCEINLINE void unlink() BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT(( (int)hooktags::link_mode == (int)auto_unlink ));
|
||||
node_ptr n(this->this_ptr());
|
||||
|
||||
92
linx64/include/boost/intrusive/detail/hash_combine.hpp
Normal file
92
linx64/include/boost/intrusive/detail/hash_combine.hpp
Normal file
@@ -0,0 +1,92 @@
|
||||
// Copyright 2005-2014 Daniel James.
|
||||
// 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)
|
||||
//
|
||||
// Based on Peter Dimov's proposal
|
||||
// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf
|
||||
// issue 6.18.
|
||||
//
|
||||
// This also contains public domain code from MurmurHash. From the
|
||||
// MurmurHash header:
|
||||
//
|
||||
// MurmurHash3 was written by Austin Appleby, and is placed in the public
|
||||
// domain. The author hereby disclaims copyright to this source code.
|
||||
//
|
||||
// Copyright 2021 Ion Gaztanaga
|
||||
// Refactored the original boost/container_hash/hash.hpp to avoid
|
||||
// any heavy std header dependencies to just combine two hash
|
||||
// values represented in a std::size_t type.
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_HASH_COMBINE_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_HASH_COMBINE_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/cstdint.hpp>
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# include <stdlib.h>
|
||||
# define BOOST_INTRUSIVE_HASH_ROTL32(x, r) _rotl(x,r)
|
||||
#else
|
||||
# define BOOST_INTRUSIVE_HASH_ROTL32(x, r) (x << r) | (x >> (32 - r))
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
namespace detail {
|
||||
|
||||
template <typename SizeT>
|
||||
inline void hash_combine_size_t(SizeT& seed, SizeT value)
|
||||
{
|
||||
seed ^= value + 0x9e3779b9 + (seed<<6) + (seed>>2);
|
||||
}
|
||||
|
||||
inline void hash_combine_size_t(boost::uint32_t& h1, boost::uint32_t k1)
|
||||
{
|
||||
const uint32_t c1 = 0xcc9e2d51;
|
||||
const uint32_t c2 = 0x1b873593;
|
||||
|
||||
k1 *= c1;
|
||||
k1 = BOOST_INTRUSIVE_HASH_ROTL32(k1,15);
|
||||
k1 *= c2;
|
||||
|
||||
h1 ^= k1;
|
||||
h1 = BOOST_INTRUSIVE_HASH_ROTL32(h1,13);
|
||||
h1 = h1*5+0xe6546b64;
|
||||
}
|
||||
|
||||
|
||||
// Don't define 64-bit hash combine on platforms without 64 bit integers,
|
||||
// and also not for 32-bit gcc as it warns about the 64-bit constant.
|
||||
#if !defined(BOOST_NO_INT64_T) && \
|
||||
!(defined(__GNUC__) && ULONG_MAX == 0xffffffff)
|
||||
inline void hash_combine_size_t(boost::uint64_t& h, boost::uint64_t k)
|
||||
{
|
||||
const boost::uint64_t m = UINT64_C(0xc6a4a7935bd1e995);
|
||||
const int r = 47;
|
||||
|
||||
k *= m;
|
||||
k ^= k >> r;
|
||||
k *= m;
|
||||
|
||||
h ^= k;
|
||||
h *= m;
|
||||
|
||||
// Completely arbitrary number, to prevent 0's
|
||||
// from hashing to 0.
|
||||
h += 0xe6546b64;
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_INT64_T
|
||||
|
||||
} //namespace detail {
|
||||
} //namespace intrusive {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //BOOST_INTRUSIVE_DETAIL_HASH_COMBINE_HPP
|
||||
@@ -26,7 +26,10 @@
|
||||
#include <boost/intrusive/pointer_traits.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/intrusive/trivial_value_traits.hpp>
|
||||
#include <boost/intrusive/slist.hpp> //make_slist
|
||||
#include <boost/intrusive/detail/common_slist_algorithms.hpp>
|
||||
#include <boost/intrusive/detail/iiterator.hpp>
|
||||
#include <boost/intrusive/detail/slist_iterator.hpp>
|
||||
#include <boost/move/detail/to_raw_pointer.hpp>
|
||||
#include <cstddef>
|
||||
#include <climits>
|
||||
#include <boost/move/core.hpp>
|
||||
@@ -35,10 +38,20 @@
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
|
||||
template <class Slist>
|
||||
struct bucket_impl : public Slist
|
||||
template <class NodeTraits>
|
||||
struct bucket_impl
|
||||
: public NodeTraits::node
|
||||
{
|
||||
typedef Slist slist_type;
|
||||
public:
|
||||
typedef NodeTraits node_traits;
|
||||
|
||||
private:
|
||||
typedef typename node_traits::node_ptr node_ptr;
|
||||
typedef typename node_traits::const_node_ptr const_node_ptr;
|
||||
|
||||
typedef detail::common_slist_algorithms<NodeTraits> algo_t;
|
||||
|
||||
public:
|
||||
BOOST_INTRUSIVE_FORCEINLINE bucket_impl()
|
||||
{}
|
||||
|
||||
@@ -46,68 +59,22 @@ struct bucket_impl : public Slist
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE ~bucket_impl()
|
||||
{
|
||||
//This bucket is still being used!
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(Slist::empty());
|
||||
}
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE bucket_impl &operator=(const bucket_impl&)
|
||||
{
|
||||
//This bucket is still in use!
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(Slist::empty());
|
||||
return *this;
|
||||
}
|
||||
{ return *this; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr get_node_ptr()
|
||||
{ return pointer_traits<node_ptr>::pointer_to(*this); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_node_ptr get_node_ptr() const
|
||||
{ return pointer_traits<const_node_ptr>::pointer_to(*this); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr begin_ptr()
|
||||
{ return node_traits::get_next(get_node_ptr()); }
|
||||
};
|
||||
|
||||
template<class Slist>
|
||||
struct bucket_traits_impl
|
||||
{
|
||||
private:
|
||||
BOOST_COPYABLE_AND_MOVABLE(bucket_traits_impl)
|
||||
|
||||
public:
|
||||
/// @cond
|
||||
|
||||
typedef typename pointer_traits
|
||||
<typename Slist::pointer>::template rebind_pointer
|
||||
< bucket_impl<Slist> >::type bucket_ptr;
|
||||
typedef Slist slist;
|
||||
typedef typename Slist::size_type size_type;
|
||||
/// @endcond
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl(bucket_ptr buckets, size_type len)
|
||||
: buckets_(buckets), buckets_len_(len)
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl(const bucket_traits_impl &x)
|
||||
: buckets_(x.buckets_), buckets_len_(x.buckets_len_)
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl(BOOST_RV_REF(bucket_traits_impl) x)
|
||||
: buckets_(x.buckets_), buckets_len_(x.buckets_len_)
|
||||
{ x.buckets_ = bucket_ptr(); x.buckets_len_ = 0; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl& operator=(BOOST_RV_REF(bucket_traits_impl) x)
|
||||
{
|
||||
buckets_ = x.buckets_; buckets_len_ = x.buckets_len_;
|
||||
x.buckets_ = bucket_ptr(); x.buckets_len_ = 0; return *this;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl& operator=(BOOST_COPY_ASSIGN_REF(bucket_traits_impl) x)
|
||||
{
|
||||
buckets_ = x.buckets_; buckets_len_ = x.buckets_len_; return *this;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const bucket_ptr &bucket_begin() const
|
||||
{ return buckets_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE size_type bucket_count() const
|
||||
{ return buckets_len_; }
|
||||
|
||||
private:
|
||||
bucket_ptr buckets_;
|
||||
size_type buckets_len_;
|
||||
};
|
||||
|
||||
template <class NodeTraits>
|
||||
struct hash_reduced_slist_node_traits
|
||||
@@ -133,22 +100,7 @@ struct reduced_slist_node_traits
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template<class NodeTraits>
|
||||
struct get_slist_impl
|
||||
{
|
||||
typedef trivial_value_traits<NodeTraits, normal_link> trivial_traits;
|
||||
|
||||
//Reducing symbol length
|
||||
struct type : make_slist
|
||||
< typename NodeTraits::node
|
||||
, boost::intrusive::value_traits<trivial_traits>
|
||||
, boost::intrusive::constant_time_size<false>
|
||||
, boost::intrusive::size_type<std::size_t>
|
||||
>::type
|
||||
{};
|
||||
};
|
||||
|
||||
template<class BucketValueTraits, bool IsConst>
|
||||
template<class BucketValueTraits, bool LinearBuckets, bool IsConst>
|
||||
class hashtable_iterator
|
||||
{
|
||||
typedef typename BucketValueTraits::value_traits value_traits;
|
||||
@@ -166,24 +118,25 @@ class hashtable_iterator
|
||||
private:
|
||||
typedef typename value_traits::node_traits node_traits;
|
||||
typedef typename node_traits::node_ptr node_ptr;
|
||||
typedef typename get_slist_impl
|
||||
< typename reduced_slist_node_traits
|
||||
<node_traits>::type >::type slist_impl;
|
||||
typedef typename slist_impl::iterator siterator;
|
||||
typedef typename slist_impl::const_iterator const_siterator;
|
||||
typedef bucket_impl<slist_impl> bucket_type;
|
||||
typedef typename BucketValueTraits::bucket_type bucket_type;
|
||||
typedef typename bucket_type::node_traits slist_node_traits;
|
||||
typedef typename slist_node_traits::node_ptr slist_node_ptr;
|
||||
typedef trivial_value_traits
|
||||
<slist_node_traits, normal_link> slist_value_traits;
|
||||
typedef slist_iterator<slist_value_traits, false> siterator;
|
||||
typedef slist_iterator<slist_value_traits, true> const_siterator;
|
||||
typedef circular_slist_algorithms<slist_node_traits> slist_node_algorithms;
|
||||
|
||||
typedef typename pointer_traits
|
||||
<pointer>::template rebind_pointer
|
||||
< const BucketValueTraits >::type const_bucketvaltraits_ptr;
|
||||
typedef typename slist_impl::size_type size_type;
|
||||
class nat;
|
||||
typedef typename
|
||||
detail::if_c< IsConst
|
||||
, hashtable_iterator<BucketValueTraits, false>
|
||||
, hashtable_iterator<BucketValueTraits, LinearBuckets, false>
|
||||
, nat>::type nonconst_iterator;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr downcast_bucket(typename bucket_type::node_ptr p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr downcast_bucket(typename bucket_type::node_traits::node_ptr p)
|
||||
{
|
||||
return pointer_traits<node_ptr>::
|
||||
pointer_to(static_cast<typename node_traits::node&>(*p));
|
||||
@@ -211,8 +164,8 @@ class hashtable_iterator
|
||||
BOOST_INTRUSIVE_FORCEINLINE const siterator &slist_it() const
|
||||
{ return slist_it_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator<BucketValueTraits, false> unconst() const
|
||||
{ return hashtable_iterator<BucketValueTraits, false>(this->slist_it(), this->get_bucket_value_traits()); }
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator<BucketValueTraits, LinearBuckets, false> unconst() const
|
||||
{ return hashtable_iterator<BucketValueTraits, LinearBuckets, false>(this->slist_it(), this->get_bucket_value_traits()); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator& operator++()
|
||||
{ this->increment(); return *this; }
|
||||
@@ -242,43 +195,42 @@ class hashtable_iterator
|
||||
(downcast_bucket(slist_it_.pointed_node()));
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const const_bucketvaltraits_ptr &get_bucket_value_traits() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_bucketvaltraits_ptr get_bucket_value_traits() const
|
||||
{ return traitsptr_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const value_traits &priv_value_traits() const
|
||||
{ return traitsptr_->priv_value_traits(); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const bucket_traits &priv_bucket_traits() const
|
||||
{ return traitsptr_->priv_bucket_traits(); }
|
||||
|
||||
private:
|
||||
|
||||
void increment()
|
||||
{
|
||||
const bucket_traits &rbuck_traits = this->priv_bucket_traits();
|
||||
bucket_type* const buckets = boost::movelib::to_raw_pointer(rbuck_traits.bucket_begin());
|
||||
const size_type buckets_len = rbuck_traits.bucket_count();
|
||||
bucket_type* const buckets = boost::movelib::to_raw_pointer(traitsptr_->priv_bucket_traits().bucket_begin());
|
||||
const std::size_t buckets_len = traitsptr_->priv_bucket_traits().bucket_count();
|
||||
|
||||
++slist_it_;
|
||||
const typename slist_impl::node_ptr n = slist_it_.pointed_node();
|
||||
const siterator first_bucket_bbegin = buckets->end();
|
||||
if(first_bucket_bbegin.pointed_node() <= n && n <= buckets[buckets_len-1].cend().pointed_node()){
|
||||
const slist_node_ptr n = slist_it_.pointed_node();
|
||||
const siterator first_bucket_bbegin(buckets->get_node_ptr());
|
||||
if(first_bucket_bbegin.pointed_node() <= n && n <= buckets[buckets_len-1].get_node_ptr()){
|
||||
//If one-past the node is inside the bucket then look for the next non-empty bucket
|
||||
//1. get the bucket_impl from the iterator
|
||||
const bucket_type &b = static_cast<const bucket_type&>
|
||||
(bucket_type::slist_type::container_from_end_iterator(slist_it_));
|
||||
const bucket_type &b = static_cast<const bucket_type&>(*n);
|
||||
|
||||
//2. Now just calculate the index b has in the bucket array
|
||||
size_type n_bucket = static_cast<size_type>(&b - buckets);
|
||||
std::size_t n_bucket = static_cast<std::size_t>(&b - buckets);
|
||||
|
||||
//3. Iterate until a non-empty bucket is found
|
||||
slist_node_ptr bucket_nodeptr = buckets->get_node_ptr();
|
||||
do{
|
||||
if (++n_bucket >= buckets_len){ //bucket overflow, return end() iterator
|
||||
slist_it_ = buckets->before_begin();
|
||||
slist_it_ = first_bucket_bbegin;
|
||||
return;
|
||||
}
|
||||
bucket_nodeptr = buckets[n_bucket].get_node_ptr();
|
||||
}
|
||||
while (buckets[n_bucket].empty());
|
||||
slist_it_ = buckets[n_bucket].begin();
|
||||
while (slist_node_algorithms::is_empty(bucket_nodeptr));
|
||||
slist_it_ = siterator(bucket_nodeptr);
|
||||
++slist_it_;
|
||||
}
|
||||
else{
|
||||
//++slist_it_ yield to a valid object
|
||||
@@ -289,6 +241,134 @@ class hashtable_iterator
|
||||
const_bucketvaltraits_ptr traitsptr_;
|
||||
};
|
||||
|
||||
template<class BucketValueTraits, bool IsConst>
|
||||
class hashtable_iterator<BucketValueTraits, true, IsConst>
|
||||
{
|
||||
typedef typename BucketValueTraits::value_traits value_traits;
|
||||
typedef typename BucketValueTraits::bucket_traits bucket_traits;
|
||||
|
||||
typedef iiterator< value_traits, IsConst
|
||||
, std::forward_iterator_tag> types_t;
|
||||
public:
|
||||
typedef typename types_t::iterator_type::difference_type difference_type;
|
||||
typedef typename types_t::iterator_type::value_type value_type;
|
||||
typedef typename types_t::iterator_type::pointer pointer;
|
||||
typedef typename types_t::iterator_type::reference reference;
|
||||
typedef typename types_t::iterator_type::iterator_category iterator_category;
|
||||
|
||||
private:
|
||||
typedef typename value_traits::node_traits node_traits;
|
||||
typedef typename node_traits::node_ptr node_ptr;
|
||||
typedef typename BucketValueTraits::bucket_type bucket_type;
|
||||
typedef typename BucketValueTraits::bucket_ptr bucket_ptr;
|
||||
typedef typename bucket_type::node_traits slist_node_traits;
|
||||
typedef linear_slist_algorithms<slist_node_traits> slist_node_algorithms;
|
||||
typedef typename slist_node_traits::node_ptr slist_node_ptr;
|
||||
typedef trivial_value_traits
|
||||
<slist_node_traits, normal_link> slist_value_traits;
|
||||
typedef slist_iterator<slist_value_traits, false> siterator;
|
||||
typedef slist_iterator<slist_value_traits, true> const_siterator;
|
||||
|
||||
static const bool stateful_value_traits =
|
||||
detail::is_stateful_value_traits<value_traits>::value;
|
||||
|
||||
typedef typename pointer_traits
|
||||
<pointer>::template rebind_pointer
|
||||
< const value_traits >::type const_value_traits_ptr;
|
||||
class nat;
|
||||
typedef typename
|
||||
detail::if_c< IsConst
|
||||
, hashtable_iterator<BucketValueTraits, true, false>
|
||||
, nat>::type nonconst_iterator;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr downcast_bucket(slist_node_ptr p)
|
||||
{
|
||||
return pointer_traits<node_ptr>::
|
||||
pointer_to(static_cast<typename node_traits::node&>(*p));
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator ()
|
||||
: slist_it_() //Value initialization to achieve "null iterators" (N3644)
|
||||
, members_()
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE explicit hashtable_iterator(siterator ptr, bucket_ptr bp, const_value_traits_ptr traits_ptr)
|
||||
: slist_it_ (ptr)
|
||||
, members_ (bp, traits_ptr)
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator(const hashtable_iterator &other)
|
||||
: slist_it_(other.slist_it()), members_(other.get_bucket_ptr(), other.get_value_traits())
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator(const nonconst_iterator &other)
|
||||
: slist_it_(other.slist_it()), members_(other.get_bucket_ptr(), other.get_value_traits())
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const siterator &slist_it() const
|
||||
{ return slist_it_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator<BucketValueTraits, true, false> unconst() const
|
||||
{ return hashtable_iterator<BucketValueTraits, true, false>(this->slist_it(), members_.nodeptr_, members_.get_ptr()); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator& operator++()
|
||||
{ this->increment(); return *this; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator &operator=(const hashtable_iterator &other)
|
||||
{ slist_it_ = other.slist_it(); members_ = other.members_; return *this; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator operator++(int)
|
||||
{
|
||||
hashtable_iterator result (*this);
|
||||
this->increment();
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE friend bool operator== (const hashtable_iterator& i, const hashtable_iterator& i2)
|
||||
{ return i.slist_it_ == i2.slist_it_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE friend bool operator!= (const hashtable_iterator& i, const hashtable_iterator& i2)
|
||||
{ return i.slist_it_ != i2.slist_it_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE reference operator*() const
|
||||
{ return *this->operator ->(); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE pointer operator->() const
|
||||
{ return this->operator_arrow(detail::bool_<stateful_value_traits>()); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr get_value_traits() const
|
||||
{ return members_.get_ptr(); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE bucket_ptr get_bucket_ptr() const
|
||||
{ return members_.nodeptr_; }
|
||||
|
||||
private:
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::false_) const
|
||||
{ return value_traits::to_value_ptr(downcast_bucket(slist_it_.pointed_node())); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::true_) const
|
||||
{ return this->get_value_traits()->to_value_ptr(downcast_bucket(slist_it_.pointed_node())); }
|
||||
|
||||
void increment()
|
||||
{
|
||||
++slist_it_;
|
||||
if (slist_it_ == siterator()){
|
||||
slist_node_ptr bucket_nodeptr;
|
||||
do {
|
||||
++members_.nodeptr_;
|
||||
bucket_nodeptr = members_.nodeptr_->get_node_ptr();
|
||||
}while(slist_node_algorithms::is_empty(bucket_nodeptr));
|
||||
slist_it_ = siterator(slist_node_traits::get_next(bucket_nodeptr));
|
||||
}
|
||||
}
|
||||
|
||||
siterator slist_it_;
|
||||
iiterator_members<bucket_ptr, const_value_traits_ptr, stateful_value_traits> members_;
|
||||
};
|
||||
|
||||
} //namespace intrusive {
|
||||
} //namespace boost {
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/move/detail/to_raw_pointer.hpp>
|
||||
#include <boost/intrusive/detail/node_holder.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
@@ -55,7 +56,7 @@ struct bhtraits_base
|
||||
typedef node& node_reference;
|
||||
typedef const node & const_node_reference;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(node_ptr n)
|
||||
{
|
||||
pointer p = pointer_traits<pointer>::pointer_to
|
||||
(static_cast<reference>(static_cast<node_holder_reference>(*n)));
|
||||
@@ -63,7 +64,7 @@ struct bhtraits_base
|
||||
return p;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const_node_ptr n)
|
||||
{
|
||||
const_pointer p = pointer_traits<const_pointer>::pointer_to
|
||||
(static_cast<const_reference>(static_cast<const_node_holder_reference>(*n)));
|
||||
@@ -132,14 +133,14 @@ struct mhtraits
|
||||
(static_cast<const_node_reference>(static_cast<const_hook_reference>(value.*P)));
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(node_ptr n)
|
||||
{
|
||||
return pointer_traits<pointer>::pointer_to
|
||||
(*detail::parent_from_member<T, Hook>
|
||||
(static_cast<Hook*>(boost::movelib::to_raw_pointer(n)), P));
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const_node_ptr n)
|
||||
{
|
||||
return pointer_traits<const_pointer>::pointer_to
|
||||
(*detail::parent_from_member<T, Hook>
|
||||
@@ -174,17 +175,17 @@ struct fhtraits
|
||||
static const_node_ptr to_node_ptr(const_reference value)
|
||||
{ return static_cast<const node*>(boost::movelib::to_raw_pointer(Functor::to_hook_ptr(value))); }
|
||||
|
||||
static pointer to_value_ptr(const node_ptr & n)
|
||||
static pointer to_value_ptr(node_ptr n)
|
||||
{ return Functor::to_value_ptr(to_hook_ptr(n)); }
|
||||
|
||||
static const_pointer to_value_ptr(const const_node_ptr & n)
|
||||
static const_pointer to_value_ptr(const_node_ptr n)
|
||||
{ return Functor::to_value_ptr(to_hook_ptr(n)); }
|
||||
|
||||
private:
|
||||
static hook_ptr to_hook_ptr(const node_ptr & n)
|
||||
static hook_ptr to_hook_ptr(node_ptr n)
|
||||
{ return hook_ptr(&*static_cast<hook_type*>(&*n)); }
|
||||
|
||||
static const_hook_ptr to_hook_ptr(const const_node_ptr & n)
|
||||
static const_hook_ptr to_hook_ptr(const_node_ptr n)
|
||||
{ return const_hook_ptr(&*static_cast<const hook_type*>(&*n)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -49,6 +49,11 @@ namespace boost {
|
||||
namespace intrusive {
|
||||
|
||||
using boost::movelib::iterator_traits;
|
||||
using boost::movelib::iter_difference;
|
||||
using boost::movelib::iter_value;
|
||||
using boost::movelib::iter_category;
|
||||
using boost::movelib::iter_size;
|
||||
|
||||
|
||||
////////////////////
|
||||
// iterator
|
||||
@@ -63,26 +68,59 @@ struct iterator
|
||||
typedef Reference reference;
|
||||
};
|
||||
|
||||
////////////////////////////////////////
|
||||
// iterator_[dis|en]able_if_boost_iterator
|
||||
////////////////////////////////////////
|
||||
template<class I>
|
||||
struct is_boost_iterator
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Conversion from boost::iterator traversals to std tags
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<class Tag>
|
||||
struct get_std_category_from_tag
|
||||
{
|
||||
static const bool value = false;
|
||||
typedef Tag type;
|
||||
};
|
||||
|
||||
template<class Category, class Traversal>
|
||||
struct is_boost_iterator< boost::iterators::detail::iterator_category_with_traversal<Category, Traversal> >
|
||||
template <class Category>
|
||||
struct get_std_category_from_tag
|
||||
<boost::iterators::detail::iterator_category_with_traversal
|
||||
<Category, boost::iterators::incrementable_traversal_tag> >
|
||||
{
|
||||
static const bool value = true;
|
||||
typedef std::input_iterator_tag type;
|
||||
};
|
||||
|
||||
template<class I, class R = void>
|
||||
struct iterator_enable_if_boost_iterator
|
||||
: ::boost::move_detail::enable_if_c
|
||||
< is_boost_iterator<typename boost::intrusive::iterator_traits<I>::iterator_category >::value
|
||||
, R>
|
||||
template <class Category>
|
||||
struct get_std_category_from_tag
|
||||
<boost::iterators::detail::iterator_category_with_traversal
|
||||
<Category, boost::iterators::single_pass_traversal_tag> >
|
||||
{
|
||||
typedef std::input_iterator_tag type;
|
||||
};
|
||||
|
||||
template <class Category>
|
||||
struct get_std_category_from_tag
|
||||
<boost::iterators::detail::iterator_category_with_traversal
|
||||
<Category, boost::iterators::forward_traversal_tag> >
|
||||
{
|
||||
typedef std::input_iterator_tag type;
|
||||
};
|
||||
|
||||
template <class Category>
|
||||
struct get_std_category_from_tag
|
||||
<boost::iterators::detail::iterator_category_with_traversal
|
||||
<Category, boost::iterators::bidirectional_traversal_tag> >
|
||||
{
|
||||
typedef std::bidirectional_iterator_tag type;
|
||||
};
|
||||
|
||||
template <class Category>
|
||||
struct get_std_category_from_tag
|
||||
<boost::iterators::detail::iterator_category_with_traversal
|
||||
<Category, boost::iterators::random_access_traversal_tag> >
|
||||
{
|
||||
typedef std::random_access_iterator_tag type;
|
||||
};
|
||||
|
||||
template<class It>
|
||||
struct get_std_category_from_it
|
||||
: get_std_category_from_tag< typename boost::intrusive::iter_category<It>::type >
|
||||
{};
|
||||
|
||||
////////////////////////////////////////
|
||||
@@ -92,7 +130,7 @@ template<class I, class Tag, class R = void>
|
||||
struct iterator_enable_if_tag
|
||||
: ::boost::move_detail::enable_if_c
|
||||
< ::boost::move_detail::is_same
|
||||
< typename boost::intrusive::iterator_traits<I>::iterator_category
|
||||
< typename get_std_category_from_it<I>::type
|
||||
, Tag
|
||||
>::value
|
||||
, R>
|
||||
@@ -102,7 +140,7 @@ template<class I, class Tag, class R = void>
|
||||
struct iterator_disable_if_tag
|
||||
: ::boost::move_detail::enable_if_c
|
||||
< !::boost::move_detail::is_same
|
||||
< typename boost::intrusive::iterator_traits<I>::iterator_category
|
||||
< typename get_std_category_from_it<I>::type
|
||||
, Tag
|
||||
>::value
|
||||
, R>
|
||||
@@ -115,11 +153,11 @@ template<class I, class Tag, class Tag2, class R = void>
|
||||
struct iterator_enable_if_convertible_tag
|
||||
: ::boost::move_detail::enable_if_c
|
||||
< ::boost::move_detail::is_same_or_convertible
|
||||
< typename boost::intrusive::iterator_traits<I>::iterator_category
|
||||
< typename get_std_category_from_it<I>::type
|
||||
, Tag
|
||||
>::value &&
|
||||
!::boost::move_detail::is_same_or_convertible
|
||||
< typename boost::intrusive::iterator_traits<I>::iterator_category
|
||||
< typename get_std_category_from_it<I>::type
|
||||
, Tag2
|
||||
>::value
|
||||
, R>
|
||||
@@ -130,37 +168,37 @@ struct iterator_enable_if_convertible_tag
|
||||
////////////////////////////////////////
|
||||
template<class I, class Tag>
|
||||
struct iterator_enable_if_tag_difference_type
|
||||
: iterator_enable_if_tag<I, Tag, typename boost::intrusive::iterator_traits<I>::difference_type>
|
||||
: iterator_enable_if_tag<I, Tag, typename boost::intrusive::iter_difference<I>::type>
|
||||
{};
|
||||
|
||||
template<class I, class Tag>
|
||||
struct iterator_disable_if_tag_difference_type
|
||||
: iterator_disable_if_tag<I, Tag, typename boost::intrusive::iterator_traits<I>::difference_type>
|
||||
: iterator_disable_if_tag<I, Tag, typename boost::intrusive::iter_difference<I>::type>
|
||||
{};
|
||||
|
||||
////////////////////
|
||||
// advance
|
||||
////////////////////
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
template<class InputIt>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag<InputIt, std::input_iterator_tag>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
iterator_advance(InputIt& it, typename iter_difference<InputIt>::type n)
|
||||
{
|
||||
while(n--)
|
||||
++it;
|
||||
}
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
template<class InputIt>
|
||||
typename iterator_enable_if_tag<InputIt, std::forward_iterator_tag>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
iterator_advance(InputIt& it, typename iter_difference<InputIt>::type n)
|
||||
{
|
||||
while(n--)
|
||||
++it;
|
||||
}
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
template<class InputIt>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag<InputIt, std::bidirectional_iterator_tag>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
iterator_advance(InputIt& it, typename iter_difference<InputIt>::type n)
|
||||
{
|
||||
for (; 0 < n; --n)
|
||||
++it;
|
||||
@@ -176,62 +214,37 @@ BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag<InputIt, std::random
|
||||
}
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
|
||||
<InputIt, const boost::iterators::incrementable_traversal_tag&, const boost::iterators::single_pass_traversal_tag&>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag<InputIt, std::random_access_iterator_tag, InputIt>::type
|
||||
make_iterator_advance(InputIt it, Distance n)
|
||||
{
|
||||
while(n--)
|
||||
++it;
|
||||
(iterator_advance)(it, n);
|
||||
return it;
|
||||
}
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
|
||||
<InputIt, const boost::iterators::single_pass_traversal_tag &, const boost::iterators::forward_traversal_tag&>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
template<class It>
|
||||
BOOST_INTRUSIVE_FORCEINLINE
|
||||
void iterator_uadvance(It& it, typename iter_size<It>::type n)
|
||||
{
|
||||
while(n--)
|
||||
++it;
|
||||
(iterator_advance)(it, (typename iterator_traits<It>::difference_type)n);
|
||||
}
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
|
||||
<InputIt, const boost::iterators::forward_traversal_tag&, const boost::iterators::bidirectional_traversal_tag&>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
template<class It>
|
||||
BOOST_INTRUSIVE_FORCEINLINE
|
||||
It make_iterator_uadvance(It it, typename iter_size<It>::type n)
|
||||
{
|
||||
while(n--)
|
||||
++it;
|
||||
(iterator_uadvance)(it, n);
|
||||
return it;
|
||||
}
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
|
||||
<InputIt, const boost::iterators::bidirectional_traversal_tag&, const boost::iterators::random_access_traversal_tag&>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
{
|
||||
for (; 0 < n; --n)
|
||||
++it;
|
||||
for (; n < 0; ++n)
|
||||
--it;
|
||||
}
|
||||
|
||||
class fake{};
|
||||
|
||||
template<class InputIt, class Distance>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_convertible_tag
|
||||
<InputIt, const boost::iterators::random_access_traversal_tag&, const fake&>::type
|
||||
iterator_advance(InputIt& it, Distance n)
|
||||
{
|
||||
it += n;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
// distance
|
||||
////////////////////
|
||||
////////////////////////////////////////
|
||||
// iterator_distance
|
||||
////////////////////////////////////////
|
||||
template<class InputIt> inline
|
||||
typename iterator_disable_if_tag_difference_type
|
||||
<InputIt, std::random_access_iterator_tag>::type
|
||||
iterator_distance(InputIt first, InputIt last)
|
||||
{
|
||||
typename iterator_traits<InputIt>::difference_type off = 0;
|
||||
typename iter_difference<InputIt>::type off = 0;
|
||||
while(first != last){
|
||||
++off;
|
||||
++first;
|
||||
@@ -244,10 +257,43 @@ BOOST_INTRUSIVE_FORCEINLINE typename iterator_enable_if_tag_difference_type
|
||||
<InputIt, std::random_access_iterator_tag>::type
|
||||
iterator_distance(InputIt first, InputIt last)
|
||||
{
|
||||
typename iterator_traits<InputIt>::difference_type off = last - first;
|
||||
typename iter_difference<InputIt>::type off = last - first;
|
||||
return off;
|
||||
}
|
||||
|
||||
////////////////////////////////////////
|
||||
// iterator_udistance
|
||||
////////////////////////////////////////
|
||||
|
||||
template<class It>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iter_size<It>::type
|
||||
iterator_udistance(It first, It last)
|
||||
{
|
||||
return (typename iter_size<It>::type)(iterator_distance)(first, last);
|
||||
}
|
||||
|
||||
////////////////////////////////////////
|
||||
// iterator_next
|
||||
////////////////////////////////////////
|
||||
|
||||
template<class InputIt>
|
||||
BOOST_INTRUSIVE_FORCEINLINE InputIt iterator_next(InputIt it, typename iter_difference<InputIt>::type n)
|
||||
{
|
||||
(iterator_advance)(it, n);
|
||||
return it;
|
||||
}
|
||||
|
||||
template<class InputIt>
|
||||
BOOST_INTRUSIVE_FORCEINLINE InputIt iterator_unext(InputIt it, typename iterator_traits<InputIt>::size_type n)
|
||||
{
|
||||
(iterator_uadvance)(it, n);
|
||||
return it;
|
||||
}
|
||||
|
||||
////////////////////////////////////////
|
||||
// iterator_arrow_result
|
||||
////////////////////////////////////////
|
||||
|
||||
template<class I>
|
||||
BOOST_INTRUSIVE_FORCEINLINE typename iterator_traits<I>::pointer iterator_arrow_result(const I &i)
|
||||
{ return i.operator->(); }
|
||||
|
||||
@@ -63,7 +63,7 @@ class list_iterator
|
||||
BOOST_INTRUSIVE_FORCEINLINE list_iterator()
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE explicit list_iterator(const node_ptr & nodeptr, const const_value_traits_ptr &traits_ptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE explicit list_iterator(node_ptr nodeptr, const_value_traits_ptr traits_ptr)
|
||||
: members_(nodeptr, traits_ptr)
|
||||
{}
|
||||
|
||||
@@ -81,8 +81,8 @@ class list_iterator
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr pointed_node() const
|
||||
{ return members_.nodeptr_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE list_iterator &operator=(const node_ptr &node)
|
||||
{ members_.nodeptr_ = node; return *this; }
|
||||
BOOST_INTRUSIVE_FORCEINLINE list_iterator &operator=(node_ptr nodeptr)
|
||||
{ members_.nodeptr_ = nodeptr; return *this; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr get_value_traits() const
|
||||
{ return members_.get_ptr(); }
|
||||
|
||||
@@ -47,19 +47,19 @@ struct list_node_traits
|
||||
typedef typename node::node_ptr node_ptr;
|
||||
typedef typename pointer_rebind<VoidPointer, const node>::type const_node_ptr;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(const_node_ptr n)
|
||||
{ return n->prev_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(node_ptr n)
|
||||
{ return n->prev_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_previous(node_ptr n, node_ptr prev)
|
||||
{ n->prev_ = prev; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const_node_ptr n)
|
||||
{ return n->next_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(node_ptr n)
|
||||
{ return n->next_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <cstddef>
|
||||
#include <climits>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <cstring>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
@@ -75,8 +76,8 @@ namespace detail {
|
||||
inline std::size_t floor_log2 (std::size_t x)
|
||||
{
|
||||
unsigned long log2;
|
||||
BOOST_INTRUSIVE_BSR_INTRINSIC( &log2, (unsigned long)x );
|
||||
return log2;
|
||||
BOOST_INTRUSIVE_BSR_INTRINSIC( &log2, x );
|
||||
return static_cast<std::size_t>(log2);
|
||||
}
|
||||
|
||||
#undef BOOST_INTRUSIVE_BSR_INTRINSIC
|
||||
@@ -92,7 +93,7 @@ namespace detail {
|
||||
struct builtin_clz_dispatch< ::boost::ulong_long_type >
|
||||
{
|
||||
static ::boost::ulong_long_type call(::boost::ulong_long_type n)
|
||||
{ return __builtin_clzll(n); }
|
||||
{ return (::boost::ulong_long_type)__builtin_clzll(n); }
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -100,14 +101,14 @@ namespace detail {
|
||||
struct builtin_clz_dispatch<unsigned long>
|
||||
{
|
||||
static unsigned long call(unsigned long n)
|
||||
{ return __builtin_clzl(n); }
|
||||
{ return (unsigned long)__builtin_clzl(n); }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct builtin_clz_dispatch<unsigned int>
|
||||
{
|
||||
static unsigned int call(unsigned int n)
|
||||
{ return __builtin_clz(n); }
|
||||
{ return (unsigned int)__builtin_clz(n); }
|
||||
};
|
||||
|
||||
inline std::size_t floor_log2(std::size_t n)
|
||||
@@ -149,53 +150,6 @@ namespace detail {
|
||||
return log2;
|
||||
}
|
||||
|
||||
////////////////////////////
|
||||
// DeBruijn method
|
||||
////////////////////////////
|
||||
|
||||
//Taken from:
|
||||
//http://stackoverflow.com/questions/11376288/fast-computing-of-log2-for-64-bit-integers
|
||||
//Thanks to Desmond Hume
|
||||
|
||||
inline std::size_t floor_log2 (std::size_t v, integral_constant<std::size_t, 32>)
|
||||
{
|
||||
static const int MultiplyDeBruijnBitPosition[32] =
|
||||
{
|
||||
0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30,
|
||||
8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31
|
||||
};
|
||||
|
||||
v |= v >> 1;
|
||||
v |= v >> 2;
|
||||
v |= v >> 4;
|
||||
v |= v >> 8;
|
||||
v |= v >> 16;
|
||||
|
||||
return MultiplyDeBruijnBitPosition[(std::size_t)(v * 0x07C4ACDDU) >> 27];
|
||||
}
|
||||
|
||||
inline std::size_t floor_log2 (std::size_t v, integral_constant<std::size_t, 64>)
|
||||
{
|
||||
static const std::size_t MultiplyDeBruijnBitPosition[64] = {
|
||||
63, 0, 58, 1, 59, 47, 53, 2,
|
||||
60, 39, 48, 27, 54, 33, 42, 3,
|
||||
61, 51, 37, 40, 49, 18, 28, 20,
|
||||
55, 30, 34, 11, 43, 14, 22, 4,
|
||||
62, 57, 46, 52, 38, 26, 32, 41,
|
||||
50, 36, 17, 19, 29, 10, 13, 21,
|
||||
56, 45, 25, 31, 35, 16, 9, 12,
|
||||
44, 24, 15, 8, 23, 7, 6, 5};
|
||||
|
||||
v |= v >> 1;
|
||||
v |= v >> 2;
|
||||
v |= v >> 4;
|
||||
v |= v >> 8;
|
||||
v |= v >> 16;
|
||||
v |= v >> 32;
|
||||
return MultiplyDeBruijnBitPosition[((std::size_t)((v - (v >> 1))*0x07EDD5E59A4E28C2ULL)) >> 58];
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t floor_log2 (std::size_t x)
|
||||
{
|
||||
const std::size_t Bits = sizeof(std::size_t)*CHAR_BIT;
|
||||
@@ -208,19 +162,12 @@ namespace detail {
|
||||
//http://www.flipcode.com/archives/Fast_log_Function.shtml
|
||||
inline float fast_log2 (float val)
|
||||
{
|
||||
union caster_t
|
||||
{
|
||||
unsigned x;
|
||||
float val;
|
||||
} caster;
|
||||
|
||||
caster.val = val;
|
||||
unsigned x = caster.x;
|
||||
unsigned x;
|
||||
std::memcpy(&x, &val, sizeof(float));
|
||||
const int log_2 = int((x >> 23) & 255) - 128;
|
||||
x &= ~(unsigned(255u) << 23u);
|
||||
x += unsigned(127) << 23u;
|
||||
caster.x = x;
|
||||
val = caster.val;
|
||||
std::memcpy(&val, &x, sizeof(float));
|
||||
//1+log2(m), m ranging from 1 to 2
|
||||
//3rd degree polynomial keeping first derivate continuity.
|
||||
//For less precision the line can be commented out
|
||||
|
||||
@@ -155,7 +155,7 @@ template <class T>\
|
||||
struct TRAITS_PREFIX##_bool\
|
||||
{\
|
||||
template<bool Add>\
|
||||
struct two_or_three {yes_type _[2 + Add];};\
|
||||
struct two_or_three {yes_type _[2u + (unsigned)Add];};\
|
||||
template <class U> static yes_type test(...);\
|
||||
template <class U> static two_or_three<U::TYPEDEF_TO_FIND> test (int);\
|
||||
static const std::size_t value = sizeof(test<T>(0));\
|
||||
|
||||
@@ -59,7 +59,7 @@ struct node_cloner
|
||||
{}
|
||||
|
||||
// tree-based containers use this method, which is proxy-reference friendly
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr operator()(const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr operator()(node_ptr p)
|
||||
{
|
||||
reference_type v = *traits_->to_value_ptr(p);
|
||||
node_ptr n = traits_->to_node_ptr(*base_t::get()(v));
|
||||
@@ -85,13 +85,13 @@ struct node_disposer
|
||||
static const bool safemode_or_autounlink =
|
||||
is_safe_autounlink<value_traits::link_mode>::value;
|
||||
|
||||
node_disposer(F f, const ValueTraits *cont)
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_disposer(F f, const ValueTraits *cont)
|
||||
: base_t(f), traits_(cont)
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void operator()(const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE void operator()(node_ptr p)
|
||||
{
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink)
|
||||
node_algorithms::init(p);
|
||||
base_t::get()(traits_->to_value_ptr(p));
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ struct node_to_value
|
||||
typedef typename pointer_traits<npointer>::
|
||||
template rebind_pointer<const ValueTraits>::type const_value_traits_ptr;
|
||||
|
||||
node_to_value(const const_value_traits_ptr &ptr)
|
||||
node_to_value(const_value_traits_ptr ptr)
|
||||
: Base(ptr)
|
||||
{}
|
||||
|
||||
|
||||
@@ -74,40 +74,40 @@ struct default_rbtree_node_traits_impl
|
||||
|
||||
typedef typename node::color color;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const_node_ptr n)
|
||||
{ return n->parent_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(node_ptr n)
|
||||
{ return n->parent_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ n->parent_ = p; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const_node_ptr n)
|
||||
{ return n->left_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(node_ptr n)
|
||||
{ return n->left_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->left_ = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const_node_ptr n)
|
||||
{ return n->right_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(node_ptr n)
|
||||
{ return n->right_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
{ n->right_ = r; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color get_color(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color get_color(const_node_ptr n)
|
||||
{ return n->color_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color get_color(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color get_color(node_ptr n)
|
||||
{ return n->color_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_color(const node_ptr & n, color c)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_color(node_ptr n, color c)
|
||||
{ n->color_ = c; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color black()
|
||||
@@ -130,40 +130,40 @@ struct compact_rbtree_node_traits_impl
|
||||
|
||||
typedef typename node::color color;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const_node_ptr n)
|
||||
{ return ptr_bit::get_pointer(n->parent_); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(node_ptr n)
|
||||
{ return ptr_bit::get_pointer(n->parent_); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ ptr_bit::set_pointer(n->parent_, p); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const_node_ptr n)
|
||||
{ return n->left_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(node_ptr n)
|
||||
{ return n->left_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->left_ = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const_node_ptr n)
|
||||
{ return n->right_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(node_ptr n)
|
||||
{ return n->right_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
{ n->right_ = r; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color get_color(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color get_color(const_node_ptr n)
|
||||
{ return (color)ptr_bit::get_bits(n->parent_); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color get_color(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color get_color(node_ptr n)
|
||||
{ return (color)ptr_bit::get_bits(n->parent_); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_color(const node_ptr & n, color c)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_color(node_ptr n, color c)
|
||||
{ ptr_bit::set_bits(n->parent_, c != 0); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static color black()
|
||||
|
||||
@@ -13,153 +13,16 @@
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_REVERSE_ITERATOR_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_REVERSE_ITERATOR_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/detail/iterator.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/move/detail/reverse_iterator.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
|
||||
template<class It>
|
||||
class reverse_iterator
|
||||
{
|
||||
public:
|
||||
typedef typename boost::intrusive::iterator_traits<It>::pointer pointer;
|
||||
typedef typename boost::intrusive::iterator_traits<It>::reference reference;
|
||||
typedef typename boost::intrusive::iterator_traits<It>::difference_type difference_type;
|
||||
typedef typename boost::intrusive::iterator_traits<It>::iterator_category iterator_category;
|
||||
typedef typename boost::intrusive::iterator_traits<It>::value_type value_type;
|
||||
|
||||
|
||||
typedef It iterator_type;
|
||||
|
||||
reverse_iterator()
|
||||
: m_current() //Value initialization to achieve "null iterators" (N3644)
|
||||
{}
|
||||
|
||||
explicit reverse_iterator(It r)
|
||||
: m_current(r)
|
||||
{}
|
||||
|
||||
reverse_iterator(const reverse_iterator& r)
|
||||
: m_current(r.base())
|
||||
{}
|
||||
|
||||
template<class OtherIt>
|
||||
reverse_iterator( const reverse_iterator<OtherIt>& r
|
||||
, typename boost::intrusive::detail::enable_if_convertible<OtherIt, It>::type* =0
|
||||
)
|
||||
: m_current(r.base())
|
||||
{}
|
||||
|
||||
reverse_iterator & operator=( const reverse_iterator& r)
|
||||
{ m_current = r.base(); return *this; }
|
||||
|
||||
template<class OtherIt>
|
||||
typename boost::intrusive::detail::enable_if_convertible<OtherIt, It, reverse_iterator &>::type
|
||||
operator=( const reverse_iterator<OtherIt>& r)
|
||||
{ m_current = r.base(); return *this; }
|
||||
|
||||
It base() const
|
||||
{ return m_current; }
|
||||
|
||||
reference operator*() const
|
||||
{
|
||||
It temp(m_current);
|
||||
--temp;
|
||||
reference r = *temp;
|
||||
return r;
|
||||
}
|
||||
|
||||
pointer operator->() const
|
||||
{
|
||||
It temp(m_current);
|
||||
--temp;
|
||||
return iterator_arrow_result(temp);
|
||||
}
|
||||
|
||||
reference operator[](difference_type off) const
|
||||
{
|
||||
return this->m_current[-off - 1];
|
||||
}
|
||||
|
||||
reverse_iterator& operator++()
|
||||
{
|
||||
--m_current;
|
||||
return *this;
|
||||
}
|
||||
|
||||
reverse_iterator operator++(int)
|
||||
{
|
||||
reverse_iterator temp((*this));
|
||||
--m_current;
|
||||
return temp;
|
||||
}
|
||||
|
||||
reverse_iterator& operator--()
|
||||
{
|
||||
++m_current;
|
||||
return *this;
|
||||
}
|
||||
|
||||
reverse_iterator operator--(int)
|
||||
{
|
||||
reverse_iterator temp((*this));
|
||||
++m_current;
|
||||
return temp;
|
||||
}
|
||||
|
||||
friend bool operator==(const reverse_iterator& l, const reverse_iterator& r)
|
||||
{ return l.m_current == r.m_current; }
|
||||
|
||||
friend bool operator!=(const reverse_iterator& l, const reverse_iterator& r)
|
||||
{ return l.m_current != r.m_current; }
|
||||
|
||||
friend bool operator<(const reverse_iterator& l, const reverse_iterator& r)
|
||||
{ return l.m_current > r.m_current; }
|
||||
|
||||
friend bool operator<=(const reverse_iterator& l, const reverse_iterator& r)
|
||||
{ return l.m_current >= r.m_current; }
|
||||
|
||||
friend bool operator>(const reverse_iterator& l, const reverse_iterator& r)
|
||||
{ return l.m_current < r.m_current; }
|
||||
|
||||
friend bool operator>=(const reverse_iterator& l, const reverse_iterator& r)
|
||||
{ return l.m_current <= r.m_current; }
|
||||
|
||||
reverse_iterator& operator+=(difference_type off)
|
||||
{ m_current -= off; return *this; }
|
||||
|
||||
reverse_iterator& operator-=(difference_type off)
|
||||
{ m_current += off; return *this; }
|
||||
|
||||
friend reverse_iterator operator+(reverse_iterator l, difference_type off)
|
||||
{ return (l += off); }
|
||||
|
||||
friend reverse_iterator operator+(difference_type off, reverse_iterator r)
|
||||
{ return (r += off); }
|
||||
|
||||
friend reverse_iterator operator-(reverse_iterator l, difference_type off)
|
||||
{ return (l-= off); }
|
||||
|
||||
friend difference_type operator-(const reverse_iterator& l, const reverse_iterator& r)
|
||||
{ return r.m_current - l.m_current; }
|
||||
|
||||
private:
|
||||
It m_current; // the wrapped iterator
|
||||
};
|
||||
using boost::movelib::reverse_iterator;
|
||||
using boost::movelib::make_reverse_iterator;
|
||||
|
||||
} //namespace intrusive {
|
||||
} //namespace boost {
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_INTRUSIVE_DETAIL_REVERSE_ITERATOR_HPP
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_SIMPLE_DISPOSERS_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_SIMPLE_DISPOSERS_HPP
|
||||
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
@@ -39,7 +41,7 @@ class init_disposer
|
||||
typedef typename NodeAlgorithms::node_ptr node_ptr;
|
||||
|
||||
public:
|
||||
BOOST_INTRUSIVE_FORCEINLINE void operator()(const node_ptr & p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE void operator()(node_ptr p)
|
||||
{ NodeAlgorithms::init(p); }
|
||||
};
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <boost/intrusive/detail/std_fwd.hpp>
|
||||
#include <boost/intrusive/detail/iiterator.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
@@ -65,10 +66,14 @@ class slist_iterator
|
||||
BOOST_INTRUSIVE_FORCEINLINE slist_iterator()
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE explicit slist_iterator(const node_ptr & nodeptr, const const_value_traits_ptr &traits_ptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE slist_iterator(node_ptr nodeptr, const_value_traits_ptr traits_ptr)
|
||||
: members_(nodeptr, traits_ptr)
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE explicit slist_iterator(node_ptr nodeptr)
|
||||
: members_(nodeptr, const_value_traits_ptr())
|
||||
{ BOOST_STATIC_ASSERT((stateful_value_traits == false)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE slist_iterator(const slist_iterator &other)
|
||||
: members_(other.pointed_node(), other.get_value_traits())
|
||||
{}
|
||||
@@ -83,12 +88,15 @@ class slist_iterator
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr pointed_node() const
|
||||
{ return members_.nodeptr_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE slist_iterator &operator=(const node_ptr &node)
|
||||
{ members_.nodeptr_ = node; return static_cast<slist_iterator&>(*this); }
|
||||
BOOST_INTRUSIVE_FORCEINLINE slist_iterator &operator=(node_ptr n)
|
||||
{ members_.nodeptr_ = n; return static_cast<slist_iterator&>(*this); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr get_value_traits() const
|
||||
{ return members_.get_ptr(); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator!() const
|
||||
{ return !members_.nodeptr_; }
|
||||
|
||||
public:
|
||||
BOOST_INTRUSIVE_FORCEINLINE slist_iterator& operator++()
|
||||
{
|
||||
@@ -107,7 +115,7 @@ class slist_iterator
|
||||
{ return l.pointed_node() == r.pointed_node(); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE friend bool operator!= (const slist_iterator& l, const slist_iterator& r)
|
||||
{ return !(l == r); }
|
||||
{ return l.pointed_node() != r.pointed_node(); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE reference operator*() const
|
||||
{ return *operator->(); }
|
||||
|
||||
@@ -46,10 +46,10 @@ struct slist_node_traits
|
||||
typedef typename node::node_ptr node_ptr;
|
||||
typedef typename pointer_rebind<VoidPointer, const node>::type const_node_ptr;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const_node_ptr n)
|
||||
{ return n->next_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(node_ptr n)
|
||||
{ return n->next_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
|
||||
|
||||
@@ -71,7 +71,7 @@ class tree_iterator
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator()
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE explicit tree_iterator(const node_ptr & nodeptr, const const_value_traits_ptr &traits_ptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE explicit tree_iterator(node_ptr nodeptr, const_value_traits_ptr traits_ptr)
|
||||
: members_(nodeptr, traits_ptr)
|
||||
{}
|
||||
|
||||
@@ -86,7 +86,7 @@ class tree_iterator
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator &operator=(const tree_iterator &other)
|
||||
{ members_.nodeptr_ = other.members_.nodeptr_; return *this; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator &operator=(const node_ptr &nodeptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE tree_iterator &operator=(node_ptr nodeptr)
|
||||
{ members_.nodeptr_ = nodeptr; return *this; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr pointed_node() const
|
||||
|
||||
@@ -44,28 +44,28 @@ struct tree_node_traits
|
||||
typedef typename node::node_ptr node_ptr;
|
||||
typedef typename pointer_rebind<VoidPointer, const node>::type const_node_ptr;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const_node_ptr n)
|
||||
{ return n->parent_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(node_ptr n)
|
||||
{ return n->parent_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
|
||||
{ n->parent_ = p; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const_node_ptr n)
|
||||
{ return n->left_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(node_ptr n)
|
||||
{ return n->left_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
|
||||
{ n->left_ = l; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const_node_ptr n)
|
||||
{ return n->right_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(node_ptr n)
|
||||
{ return n->right_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
|
||||
|
||||
49
linx64/include/boost/intrusive/detail/twin.hpp
Normal file
49
linx64/include/boost/intrusive/detail/twin.hpp
Normal file
@@ -0,0 +1,49 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (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_TWIN_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_TWIN_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
//A tiny utility to avoid pulling std::pair / utility for
|
||||
//very simple algorithms/types
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
|
||||
template <class T>
|
||||
struct twin
|
||||
{
|
||||
typedef T type;
|
||||
twin()
|
||||
: first(), second()
|
||||
{}
|
||||
|
||||
twin(const type &f, const type &s)
|
||||
: first(f), second(s)
|
||||
{}
|
||||
|
||||
T first;
|
||||
T second;
|
||||
};
|
||||
|
||||
} //namespace intrusive{
|
||||
} //namespace boost{
|
||||
|
||||
#endif //BOOST_INTRUSIVE_DETAIL_TWIN_HPP
|
||||
52
linx64/include/boost/intrusive/detail/value_functors.hpp
Normal file
52
linx64/include/boost/intrusive/detail/value_functors.hpp
Normal file
@@ -0,0 +1,52 @@
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_VALUE_FUNCTORS_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_VALUE_FUNCTORS_HPP
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2017-2021. 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_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
|
||||
//Functors for member algorithm defaults
|
||||
template<class ValueType>
|
||||
struct value_less
|
||||
{
|
||||
bool operator()(const ValueType &a, const ValueType &b) const
|
||||
{ return a < b; }
|
||||
};
|
||||
|
||||
//Functors for member algorithm defaults
|
||||
template<class T>
|
||||
struct value_less<T*>
|
||||
{
|
||||
bool operator()(const T *a, const T* b) const
|
||||
{ return std::size_t(a) < std::size_t(b); }
|
||||
};
|
||||
|
||||
template<class ValueType>
|
||||
struct value_equal
|
||||
{
|
||||
bool operator()(const ValueType &a, const ValueType &b) const
|
||||
{ return a == b; }
|
||||
};
|
||||
|
||||
} //namespace intrusive {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //BOOST_INTRUSIVE_DETAIL_VALUE_FUNCTORS_HPP
|
||||
@@ -23,6 +23,11 @@
|
||||
#include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
// MSVC-12 ICEs when variadic templates are enabled.
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && (!defined(BOOST_MSVC) || BOOST_MSVC >= 1900)
|
||||
#define BOOST_INTRUSIVE_VARIADIC_TEMPLATES
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
#define BOOST_INTRUSIVE_PERFECT_FORWARDING
|
||||
#endif
|
||||
@@ -40,14 +45,40 @@
|
||||
#define BOOST_INTRUSIVE_FORCEINLINE inline
|
||||
#elif defined(BOOST_INTRUSIVE_FORCEINLINE_IS_BOOST_FORCELINE)
|
||||
#define BOOST_INTRUSIVE_FORCEINLINE BOOST_FORCEINLINE
|
||||
#elif defined(BOOST_MSVC) && defined(_DEBUG)
|
||||
//"__forceinline" and MSVC seems to have some bugs in debug mode
|
||||
#elif defined(BOOST_MSVC) && (_MSC_VER < 1900 || defined(_DEBUG))
|
||||
//"__forceinline" and MSVC seems to have some bugs in old versions and in debug mode
|
||||
#define BOOST_INTRUSIVE_FORCEINLINE inline
|
||||
#elif defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ < 5)))
|
||||
#elif defined(BOOST_GCC) && ((__GNUC__ <= 5) || defined(__MINGW32__))
|
||||
//Older GCCs have problems with forceinline
|
||||
#define BOOST_INTRUSIVE_FORCEINLINE inline
|
||||
#else
|
||||
#define BOOST_INTRUSIVE_FORCEINLINE BOOST_FORCEINLINE
|
||||
#endif
|
||||
|
||||
#if !(defined BOOST_NO_EXCEPTIONS)
|
||||
# define BOOST_INTRUSIVE_TRY { try
|
||||
# define BOOST_INTRUSIVE_CATCH(x) catch(x)
|
||||
# define BOOST_INTRUSIVE_RETHROW throw;
|
||||
# define BOOST_INTRUSIVE_CATCH_END }
|
||||
#else
|
||||
# if !defined(BOOST_MSVC) || BOOST_MSVC >= 1900
|
||||
# define BOOST_INTRUSIVE_TRY { if (true)
|
||||
# define BOOST_INTRUSIVE_CATCH(x) else if (false)
|
||||
# else
|
||||
// warning C4127: conditional expression is constant
|
||||
# define BOOST_INTRUSIVE_TRY { \
|
||||
__pragma(warning(push)) \
|
||||
__pragma(warning(disable: 4127)) \
|
||||
if (true) \
|
||||
__pragma(warning(pop))
|
||||
# define BOOST_INTRUSIVE_CATCH(x) else \
|
||||
__pragma(warning(push)) \
|
||||
__pragma(warning(disable: 4127)) \
|
||||
if (false) \
|
||||
__pragma(warning(pop))
|
||||
# endif
|
||||
# define BOOST_INTRUSIVE_RETHROW
|
||||
# define BOOST_INTRUSIVE_CATCH_END }
|
||||
#endif
|
||||
|
||||
#endif //#ifndef BOOST_INTRUSIVE_DETAIL_WORKAROUND_HPP
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -570,6 +570,7 @@ template
|
||||
, class O8 = void
|
||||
, class O9 = void
|
||||
, class O10 = void
|
||||
, class O11 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
@@ -589,6 +590,7 @@ template
|
||||
, class O8 = void
|
||||
, class O9 = void
|
||||
, class O10 = void
|
||||
, class O11 = void
|
||||
>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <boost/intrusive/detail/common_slist_algorithms.hpp>
|
||||
#include <boost/intrusive/detail/algo_type.hpp>
|
||||
#include <cstddef>
|
||||
#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
|
||||
#include <boost/intrusive/detail/twin.hpp> //for node_pair
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
@@ -62,6 +62,12 @@ class linear_slist_algorithms
|
||||
typedef typename NodeTraits::node_ptr node_ptr;
|
||||
typedef typename NodeTraits::const_node_ptr const_node_ptr;
|
||||
typedef NodeTraits node_traits;
|
||||
//A simple struct containing:
|
||||
//
|
||||
// typedef node_ptr type;
|
||||
// node_ptr first;
|
||||
// node_ptr second;
|
||||
typedef twin<node_ptr> node_pair;
|
||||
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
|
||||
@@ -72,7 +78,7 @@ class linear_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void init(const node_ptr & this_node);
|
||||
static void init(node_ptr this_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
|
||||
//!
|
||||
@@ -83,7 +89,7 @@ class linear_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static bool unique(const_node_ptr this_node);
|
||||
static bool unique(const_node_ptr this_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Returns true is "this_node" has the same state as if
|
||||
//! it was inited using "init(node_ptr)"
|
||||
@@ -91,7 +97,7 @@ class linear_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static bool inited(const_node_ptr this_node);
|
||||
static bool inited(const_node_ptr this_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: prev_node must be in a circular list or be an empty circular list.
|
||||
//!
|
||||
@@ -100,7 +106,7 @@ class linear_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void unlink_after(const node_ptr & prev_node);
|
||||
static void unlink_after(node_ptr prev_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: prev_node and last_node must be in a circular list
|
||||
//! or be an empty circular list.
|
||||
@@ -110,7 +116,7 @@ class linear_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void unlink_after(const node_ptr & prev_node, const node_ptr & last_node);
|
||||
static void unlink_after(node_ptr prev_node, node_ptr last_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: prev_node must be a node of a linear list.
|
||||
//!
|
||||
@@ -119,7 +125,7 @@ class linear_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void link_after(const node_ptr & prev_node, const node_ptr & this_node);
|
||||
static void link_after(node_ptr prev_node, node_ptr this_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Requires</b>: b and e must be nodes of the same linear list or an empty range.
|
||||
//! and p must be a node of a different linear list.
|
||||
@@ -130,7 +136,11 @@ class linear_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void transfer_after(const node_ptr & p, const node_ptr & b, const node_ptr & e);
|
||||
static void transfer_after(node_ptr p, node_ptr b, node_ptr e) BOOST_NOEXCEPT;
|
||||
|
||||
#else
|
||||
|
||||
using base_t::transfer_after;
|
||||
|
||||
#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
|
||||
@@ -141,9 +151,44 @@ class linear_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init_header(const node_ptr & this_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init_header(node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ NodeTraits::set_next(this_node, node_ptr ()); }
|
||||
|
||||
//! <b>Requires</b>: 'p' is the first node of a list.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns a pointer to a node that represents the "end" (one past end) node
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant time.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr end_node(const_node_ptr) BOOST_NOEXCEPT
|
||||
{ return node_ptr(); }
|
||||
|
||||
//! <b>Effects</b>: Returns true if this_node_points to an empty list.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool is_empty(const_node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ return !NodeTraits::get_next(this_node); }
|
||||
|
||||
//! <b>Effects</b>: Returns true if this_node points to a sentinel node.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool is_sentinel(const_node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ return NodeTraits::get_next(this_node) == this_node; }
|
||||
|
||||
//! <b>Effects</b>: Marks this node as a "sentinel" node, a special state that is different from "empty",
|
||||
//! that can be used to mark a special state of the list
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_sentinel(node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ NodeTraits::set_next(this_node, this_node); }
|
||||
|
||||
//! <b>Requires</b>: this_node and prev_init_node must be in the same linear list.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the previous node of this_node in the linear list starting.
|
||||
@@ -153,7 +198,8 @@ class linear_slist_algorithms
|
||||
//! <b>Complexity</b>: Linear to the number of elements between prev_init_node and this_node.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_node(const node_ptr & prev_init_node, const node_ptr & this_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr
|
||||
get_previous_node(node_ptr prev_init_node, node_ptr this_node) BOOST_NOEXCEPT
|
||||
{ return base_t::get_previous_node(prev_init_node, this_node); }
|
||||
|
||||
//! <b>Requires</b>: this_node must be in a linear list or be an empty linear list.
|
||||
@@ -164,7 +210,7 @@ class linear_slist_algorithms
|
||||
//! <b>Complexity</b>: Linear
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static std::size_t count(const const_node_ptr & this_node)
|
||||
static std::size_t count(const_node_ptr this_node) BOOST_NOEXCEPT
|
||||
{
|
||||
std::size_t result = 0;
|
||||
const_node_ptr p = this_node;
|
||||
@@ -184,7 +230,7 @@ class linear_slist_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void swap_trailing_nodes(node_ptr this_node, node_ptr other_node)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void swap_trailing_nodes(node_ptr this_node, node_ptr other_node) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr this_nxt = NodeTraits::get_next(this_node);
|
||||
node_ptr other_nxt = NodeTraits::get_next(other_node);
|
||||
@@ -199,7 +245,7 @@ class linear_slist_algorithms
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: This function is linear to the contained elements.
|
||||
static node_ptr reverse(node_ptr p)
|
||||
static node_ptr reverse(node_ptr p) BOOST_NOEXCEPT
|
||||
{
|
||||
if(!p) return node_ptr();
|
||||
node_ptr i = NodeTraits::get_next(p);
|
||||
@@ -222,9 +268,9 @@ class linear_slist_algorithms
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
|
||||
static std::pair<node_ptr, node_ptr> move_first_n_backwards(node_ptr p, std::size_t n)
|
||||
static node_pair move_first_n_backwards(node_ptr p, std::size_t n) BOOST_NOEXCEPT
|
||||
{
|
||||
std::pair<node_ptr, node_ptr> ret;
|
||||
node_pair ret;
|
||||
//Null shift, or count() == 0 or 1, nothing to do
|
||||
if(!n || !p || !NodeTraits::get_next(p)){
|
||||
return ret;
|
||||
@@ -277,9 +323,9 @@ class linear_slist_algorithms
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
|
||||
static std::pair<node_ptr, node_ptr> move_first_n_forward(node_ptr p, std::size_t n)
|
||||
static node_pair move_first_n_forward(node_ptr p, std::size_t n) BOOST_NOEXCEPT
|
||||
{
|
||||
std::pair<node_ptr, node_ptr> ret;
|
||||
node_pair ret;
|
||||
//Null shift, or count() == 0 or 1, nothing to do
|
||||
if(!n || !p || !NodeTraits::get_next(p))
|
||||
return ret;
|
||||
@@ -322,6 +368,40 @@ class linear_slist_algorithms
|
||||
ret.second = new_last;
|
||||
return ret;
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: other must be a list and p must be a node of a different linear list.
|
||||
//!
|
||||
//! <b>Effects</b>: Transfers all nodes from other after p in p's linear list.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static void transfer_after(node_ptr p, node_ptr other) BOOST_NOEXCEPT
|
||||
{
|
||||
if ((is_empty)(p)) {
|
||||
(swap_trailing_nodes)(p, other);
|
||||
}
|
||||
else {
|
||||
node_ptr other_last((get_previous_node)(other, node_ptr()));
|
||||
base_t::transfer_after(p, other, other_last);
|
||||
}
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: "disposer" must be an object function
|
||||
//! taking a node_ptr parameter and shouldn't throw.
|
||||
//!
|
||||
//! <b>Effects</b>: Unlinks all nodes reachable from p (but not p) and calls
|
||||
//! <tt>void disposer::operator()(node_ptr)</tt> for every node of the list
|
||||
//! where p is linked.
|
||||
//!
|
||||
//! <b>Returns</b>: The number of disposed nodes
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of element of the list.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
template<class Disposer>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static std::size_t detach_and_dispose(node_ptr p, Disposer disposer) BOOST_NOEXCEPT
|
||||
{ return base_t::unlink_after_and_dispose(p, node_ptr(), disposer); }
|
||||
};
|
||||
|
||||
/// @cond
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#include <boost/intrusive/detail/minimal_less_equal_header.hpp>//std::less
|
||||
#include <boost/intrusive/detail/value_functors.hpp>
|
||||
#include <cstddef> //std::size_t, etc.
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
@@ -127,10 +127,10 @@ class list_impl
|
||||
((int)value_traits::link_mode == (int)auto_unlink)
|
||||
));
|
||||
|
||||
node_ptr get_root_node()
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr get_root_node()
|
||||
{ return data_.root_plus_size_.m_header.get_node(); }
|
||||
|
||||
const_node_ptr get_root_node() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_node_ptr get_root_node() const
|
||||
{ return data_.root_plus_size_.m_header.get_node(); }
|
||||
|
||||
struct root_plus_size : public size_traits
|
||||
@@ -141,29 +141,29 @@ class list_impl
|
||||
struct data_t : public value_traits
|
||||
{
|
||||
typedef typename list_impl::value_traits value_traits;
|
||||
explicit data_t(const value_traits &val_traits)
|
||||
BOOST_INTRUSIVE_FORCEINLINE explicit data_t(const value_traits &val_traits)
|
||||
: value_traits(val_traits)
|
||||
{}
|
||||
|
||||
root_plus_size root_plus_size_;
|
||||
} data_;
|
||||
|
||||
size_traits &priv_size_traits()
|
||||
BOOST_INTRUSIVE_FORCEINLINE size_traits &priv_size_traits() BOOST_NOEXCEPT
|
||||
{ return data_.root_plus_size_; }
|
||||
|
||||
const size_traits &priv_size_traits() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const size_traits &priv_size_traits() const BOOST_NOEXCEPT
|
||||
{ return data_.root_plus_size_; }
|
||||
|
||||
const value_traits &priv_value_traits() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const value_traits &priv_value_traits() const BOOST_NOEXCEPT
|
||||
{ return data_; }
|
||||
|
||||
value_traits &priv_value_traits()
|
||||
BOOST_INTRUSIVE_FORCEINLINE value_traits &priv_value_traits() BOOST_NOEXCEPT
|
||||
{ return data_; }
|
||||
|
||||
typedef typename boost::intrusive::value_traits_pointers
|
||||
<ValueTraits>::const_value_traits_ptr const_value_traits_ptr;
|
||||
|
||||
const_value_traits_ptr priv_value_traits_ptr() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr priv_value_traits_ptr() const BOOST_NOEXCEPT
|
||||
{ return pointer_traits<const_value_traits_ptr>::pointer_to(this->priv_value_traits()); }
|
||||
|
||||
/// @endcond
|
||||
@@ -245,11 +245,13 @@ class list_impl
|
||||
//! are called), but the hooks according to the ValueTraits template parameter
|
||||
//! are set to their default value.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the number of elements in the list, if
|
||||
//! it's a safe-mode or auto-unlink value . Otherwise constant.
|
||||
~list_impl()
|
||||
{
|
||||
if(is_safe_autounlink<ValueTraits::link_mode>::value){
|
||||
BOOST_IF_CONSTEXPR(is_safe_autounlink<ValueTraits::link_mode>::value){
|
||||
this->clear();
|
||||
node_algorithms::init(this->get_root_node());
|
||||
}
|
||||
@@ -265,7 +267,7 @@ class list_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references.
|
||||
void push_back(reference value)
|
||||
void push_back(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_insert = priv_value_traits().to_node_ptr(value);
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(to_insert));
|
||||
@@ -283,7 +285,7 @@ class list_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references.
|
||||
void push_front(reference value)
|
||||
void push_front(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_insert = priv_value_traits().to_node_ptr(value);
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(to_insert));
|
||||
@@ -299,7 +301,7 @@ class list_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references) to the erased element.
|
||||
void pop_back()
|
||||
void pop_back() BOOST_NOEXCEPT
|
||||
{ return this->pop_back_and_dispose(detail::null_disposer()); }
|
||||
|
||||
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
|
||||
@@ -314,12 +316,12 @@ class list_impl
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators to the erased element.
|
||||
template<class Disposer>
|
||||
void pop_back_and_dispose(Disposer disposer)
|
||||
void pop_back_and_dispose(Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_erase = node_traits::get_previous(this->get_root_node());
|
||||
node_algorithms::unlink(to_erase);
|
||||
this->priv_size_traits().decrement();
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink)
|
||||
node_algorithms::init(to_erase);
|
||||
disposer(priv_value_traits().to_value_ptr(to_erase));
|
||||
}
|
||||
@@ -332,7 +334,7 @@ class list_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references) to the erased element.
|
||||
void pop_front()
|
||||
void pop_front() BOOST_NOEXCEPT
|
||||
{ return this->pop_front_and_dispose(detail::null_disposer()); }
|
||||
|
||||
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
|
||||
@@ -347,12 +349,12 @@ class list_impl
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators to the erased element.
|
||||
template<class Disposer>
|
||||
void pop_front_and_dispose(Disposer disposer)
|
||||
void pop_front_and_dispose(Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_erase = node_traits::get_next(this->get_root_node());
|
||||
node_algorithms::unlink(to_erase);
|
||||
this->priv_size_traits().decrement();
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink)
|
||||
node_algorithms::init(to_erase);
|
||||
disposer(priv_value_traits().to_value_ptr(to_erase));
|
||||
}
|
||||
@@ -362,7 +364,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
reference front()
|
||||
BOOST_INTRUSIVE_FORCEINLINE reference front() BOOST_NOEXCEPT
|
||||
{ return *priv_value_traits().to_value_ptr(node_traits::get_next(this->get_root_node())); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reference to the first element of the list.
|
||||
@@ -370,7 +372,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reference front() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_reference front() const BOOST_NOEXCEPT
|
||||
{ return *priv_value_traits().to_value_ptr(node_traits::get_next(this->get_root_node())); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reference to the last element of the list.
|
||||
@@ -378,7 +380,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
reference back()
|
||||
BOOST_INTRUSIVE_FORCEINLINE reference back() BOOST_NOEXCEPT
|
||||
{ return *priv_value_traits().to_value_ptr(node_traits::get_previous(this->get_root_node())); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reference to the last element of the list.
|
||||
@@ -386,7 +388,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reference back() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_reference back() const BOOST_NOEXCEPT
|
||||
{ return *priv_value_traits().to_value_ptr(detail::uncast(node_traits::get_previous(this->get_root_node()))); }
|
||||
|
||||
//! <b>Effects</b>: Returns an iterator to the first element contained in the list.
|
||||
@@ -394,7 +396,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
iterator begin()
|
||||
BOOST_INTRUSIVE_FORCEINLINE iterator begin() BOOST_NOEXCEPT
|
||||
{ return iterator(node_traits::get_next(this->get_root_node()), this->priv_value_traits_ptr()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
|
||||
@@ -402,7 +404,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_iterator begin() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT
|
||||
{ return this->cbegin(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
|
||||
@@ -410,7 +412,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_iterator cbegin() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT
|
||||
{ return const_iterator(node_traits::get_next(this->get_root_node()), this->priv_value_traits_ptr()); }
|
||||
|
||||
//! <b>Effects</b>: Returns an iterator to the end of the list.
|
||||
@@ -418,7 +420,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
iterator end()
|
||||
BOOST_INTRUSIVE_FORCEINLINE iterator end() BOOST_NOEXCEPT
|
||||
{ return iterator(this->get_root_node(), this->priv_value_traits_ptr()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator to the end of the list.
|
||||
@@ -426,7 +428,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_iterator end() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT
|
||||
{ return this->cend(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a constant iterator to the end of the list.
|
||||
@@ -434,7 +436,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_iterator cend() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT
|
||||
{ return const_iterator(detail::uncast(this->get_root_node()), this->priv_value_traits_ptr()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
|
||||
@@ -443,7 +445,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
reverse_iterator rbegin()
|
||||
BOOST_INTRUSIVE_FORCEINLINE reverse_iterator rbegin() BOOST_NOEXCEPT
|
||||
{ return reverse_iterator(this->end()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
||||
@@ -452,7 +454,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reverse_iterator rbegin() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator rbegin() const BOOST_NOEXCEPT
|
||||
{ return this->crbegin(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
||||
@@ -461,7 +463,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reverse_iterator crbegin() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator crbegin() const BOOST_NOEXCEPT
|
||||
{ return const_reverse_iterator(end()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a reverse_iterator pointing to the end
|
||||
@@ -470,7 +472,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
reverse_iterator rend()
|
||||
BOOST_INTRUSIVE_FORCEINLINE reverse_iterator rend() BOOST_NOEXCEPT
|
||||
{ return reverse_iterator(begin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
@@ -479,7 +481,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reverse_iterator rend() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator rend() const BOOST_NOEXCEPT
|
||||
{ return this->crend(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
@@ -488,7 +490,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reverse_iterator crend() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator crend() const BOOST_NOEXCEPT
|
||||
{ return const_reverse_iterator(this->begin()); }
|
||||
|
||||
//! <b>Precondition</b>: end_iterator must be a valid end iterator
|
||||
@@ -499,7 +501,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
static list_impl &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static list_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return list_impl::priv_container_from_end_iterator(end_iterator); }
|
||||
|
||||
//! <b>Precondition</b>: end_iterator must be a valid end const_iterator
|
||||
@@ -510,7 +512,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
static const list_impl &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const list_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return list_impl::priv_container_from_end_iterator(end_iterator); }
|
||||
|
||||
//! <b>Effects</b>: Returns the number of the elements contained in the list.
|
||||
@@ -521,9 +523,9 @@ class list_impl
|
||||
//! if constant-time size option is disabled. Constant time otherwise.
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references.
|
||||
size_type size() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE size_type size() const BOOST_NOEXCEPT
|
||||
{
|
||||
if(constant_time_size)
|
||||
BOOST_IF_CONSTEXPR(constant_time_size)
|
||||
return this->priv_size_traits().get_size();
|
||||
else
|
||||
return node_algorithms::count(this->get_root_node()) - 1;
|
||||
@@ -536,7 +538,7 @@ class list_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references.
|
||||
bool empty() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool empty() const BOOST_NOEXCEPT
|
||||
{ return node_algorithms::unique(this->get_root_node()); }
|
||||
|
||||
//! <b>Effects</b>: Swaps the elements of x and *this.
|
||||
@@ -546,7 +548,7 @@ class list_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references.
|
||||
void swap(list_impl& other)
|
||||
void swap(list_impl& other) BOOST_NOEXCEPT
|
||||
{
|
||||
node_algorithms::swap_nodes(this->get_root_node(), other.get_root_node());
|
||||
this->priv_size_traits().swap(other.priv_size_traits());
|
||||
@@ -561,7 +563,7 @@ class list_impl
|
||||
//! <b>Complexity</b>: Linear to the number of shifts.
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references.
|
||||
void shift_backwards(size_type n = 1)
|
||||
BOOST_INTRUSIVE_FORCEINLINE void shift_backwards(size_type n = 1) BOOST_NOEXCEPT
|
||||
{ node_algorithms::move_forward(this->get_root_node(), n); }
|
||||
|
||||
//! <b>Effects</b>: Moves forward all the elements, so that the second
|
||||
@@ -573,7 +575,7 @@ class list_impl
|
||||
//! <b>Complexity</b>: Linear to the number of shifts.
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references.
|
||||
void shift_forward(size_type n = 1)
|
||||
BOOST_INTRUSIVE_FORCEINLINE void shift_forward(size_type n = 1) BOOST_NOEXCEPT
|
||||
{ node_algorithms::move_backwards(this->get_root_node(), n); }
|
||||
|
||||
//! <b>Effects</b>: Erases the element pointed by i of the list.
|
||||
@@ -588,7 +590,7 @@ class list_impl
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references) to the
|
||||
//! erased element.
|
||||
iterator erase(const_iterator i)
|
||||
BOOST_INTRUSIVE_FORCEINLINE iterator erase(const_iterator i) BOOST_NOEXCEPT
|
||||
{ return this->erase_and_dispose(i, detail::null_disposer()); }
|
||||
|
||||
//! <b>Requires</b>: b and e must be valid iterators to elements in *this.
|
||||
@@ -606,9 +608,9 @@ class list_impl
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references) to the
|
||||
//! erased elements.
|
||||
iterator erase(const_iterator b, const_iterator e)
|
||||
BOOST_INTRUSIVE_FORCEINLINE iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT
|
||||
{
|
||||
if(safemode_or_autounlink || constant_time_size){
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink || constant_time_size){
|
||||
return this->erase_and_dispose(b, e, detail::null_disposer());
|
||||
}
|
||||
else{
|
||||
@@ -633,14 +635,15 @@ class list_impl
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references) to the
|
||||
//! erased elements.
|
||||
iterator erase(const_iterator b, const_iterator e, size_type n)
|
||||
iterator erase(const_iterator b, const_iterator e, size_type n) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(node_algorithms::distance(b.pointed_node(), e.pointed_node()) == n);
|
||||
if(safemode_or_autounlink || constant_time_size){
|
||||
(void)n;
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink){
|
||||
return this->erase_and_dispose(b, e, detail::null_disposer());
|
||||
}
|
||||
else{
|
||||
if(constant_time_size){
|
||||
BOOST_IF_CONSTEXPR(constant_time_size){
|
||||
this->priv_size_traits().decrease(n);
|
||||
}
|
||||
node_algorithms::unlink(b.pointed_node(), e.pointed_node());
|
||||
@@ -663,13 +666,13 @@ class list_impl
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators to the erased element.
|
||||
template <class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer)
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_erase(i.pointed_node());
|
||||
++i;
|
||||
node_algorithms::unlink(to_erase);
|
||||
this->priv_size_traits().decrement();
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink)
|
||||
node_algorithms::init(to_erase);
|
||||
disposer(this->priv_value_traits().to_value_ptr(to_erase));
|
||||
return i.unconst();
|
||||
@@ -677,7 +680,7 @@ class list_impl
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(iterator i, Disposer disposer)
|
||||
iterator erase_and_dispose(iterator i, Disposer disposer) BOOST_NOEXCEPT
|
||||
{ return this->erase_and_dispose(const_iterator(i), disposer); }
|
||||
#endif
|
||||
|
||||
@@ -696,14 +699,14 @@ class list_impl
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators to the erased elements.
|
||||
template <class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr bp(b.pointed_node()), ep(e.pointed_node());
|
||||
node_algorithms::unlink(bp, ep);
|
||||
while(bp != ep){
|
||||
node_ptr to_erase(bp);
|
||||
bp = node_traits::get_next(bp);
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink)
|
||||
node_algorithms::init(to_erase);
|
||||
disposer(priv_value_traits().to_value_ptr(to_erase));
|
||||
this->priv_size_traits().decrement();
|
||||
@@ -720,9 +723,9 @@ class list_impl
|
||||
//! if it's a safe-mode or auto-unlink value_type. Constant time otherwise.
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references) to the erased elements.
|
||||
void clear()
|
||||
void clear() BOOST_NOEXCEPT
|
||||
{
|
||||
if(safemode_or_autounlink){
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink){
|
||||
this->clear_and_dispose(detail::null_disposer());
|
||||
}
|
||||
else{
|
||||
@@ -743,13 +746,13 @@ class list_impl
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators to the erased elements.
|
||||
template <class Disposer>
|
||||
void clear_and_dispose(Disposer disposer)
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
const_iterator it(this->begin()), itend(this->end());
|
||||
while(it != itend){
|
||||
node_ptr to_erase(it.pointed_node());
|
||||
++it;
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink)
|
||||
node_algorithms::init(to_erase);
|
||||
disposer(priv_value_traits().to_value_ptr(to_erase));
|
||||
}
|
||||
@@ -822,7 +825,7 @@ class list_impl
|
||||
//! <b>Complexity</b>: Constant time. No copy constructors are called.
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references.
|
||||
iterator insert(const_iterator p, reference value)
|
||||
iterator insert(const_iterator p, reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_insert = this->priv_value_traits().to_node_ptr(value);
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(to_insert));
|
||||
@@ -843,7 +846,7 @@ class list_impl
|
||||
//!
|
||||
//! <b>Note</b>: Does not affect the validity of iterators and references.
|
||||
template<class Iterator>
|
||||
void insert(const_iterator p, Iterator b, Iterator e)
|
||||
void insert(const_iterator p, Iterator b, Iterator e) BOOST_NOEXCEPT
|
||||
{
|
||||
for (; b != e; ++b)
|
||||
this->insert(p, *b);
|
||||
@@ -865,7 +868,7 @@ class list_impl
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references)
|
||||
//! to the erased elements.
|
||||
template<class Iterator>
|
||||
void assign(Iterator b, Iterator e)
|
||||
void assign(Iterator b, Iterator e) BOOST_NOEXCEPT
|
||||
{
|
||||
this->clear();
|
||||
this->insert(this->cend(), b, e);
|
||||
@@ -888,7 +891,7 @@ class list_impl
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references)
|
||||
//! to the erased elements.
|
||||
template<class Iterator, class Disposer>
|
||||
void dispose_and_assign(Disposer disposer, Iterator b, Iterator e)
|
||||
void dispose_and_assign(Disposer disposer, Iterator b, Iterator e) BOOST_NOEXCEPT
|
||||
{
|
||||
this->clear_and_dispose(disposer);
|
||||
this->insert(this->cend(), b, e);
|
||||
@@ -905,7 +908,7 @@ class list_impl
|
||||
//!
|
||||
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of
|
||||
//! this list. Iterators of this list and all the references are not invalidated.
|
||||
void splice(const_iterator p, list_impl& x)
|
||||
void splice(const_iterator p, list_impl& x) BOOST_NOEXCEPT
|
||||
{
|
||||
if(!x.empty()){
|
||||
node_algorithms::transfer
|
||||
@@ -930,7 +933,7 @@ class list_impl
|
||||
//!
|
||||
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
|
||||
//! list. Iterators of this list and all the references are not invalidated.
|
||||
void splice(const_iterator p, list_impl&x, const_iterator new_ele)
|
||||
void splice(const_iterator p, list_impl&x, const_iterator new_ele) BOOST_NOEXCEPT
|
||||
{
|
||||
node_algorithms::transfer(p.pointed_node(), new_ele.pointed_node());
|
||||
x.priv_size_traits().decrement();
|
||||
@@ -950,9 +953,9 @@ class list_impl
|
||||
//!
|
||||
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
|
||||
//! list. Iterators of this list and all the references are not invalidated.
|
||||
void splice(const_iterator p, list_impl&x, const_iterator f, const_iterator e)
|
||||
void splice(const_iterator p, list_impl&x, const_iterator f, const_iterator e) BOOST_NOEXCEPT
|
||||
{
|
||||
if(constant_time_size)
|
||||
BOOST_IF_CONSTEXPR(constant_time_size)
|
||||
this->splice(p, x, f, e, node_algorithms::distance(f.pointed_node(), e.pointed_node()));
|
||||
else
|
||||
this->splice(p, x, f, e, 1);//intrusive::iterator_distance is a dummy value
|
||||
@@ -971,10 +974,10 @@ class list_impl
|
||||
//!
|
||||
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
|
||||
//! list. Iterators of this list and all the references are not invalidated.
|
||||
void splice(const_iterator p, list_impl&x, const_iterator f, const_iterator e, size_type n)
|
||||
void splice(const_iterator p, list_impl&x, const_iterator f, const_iterator e, size_type n) BOOST_NOEXCEPT
|
||||
{
|
||||
if(n){
|
||||
if(constant_time_size){
|
||||
BOOST_IF_CONSTEXPR(constant_time_size){
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(n == node_algorithms::distance(f.pointed_node(), e.pointed_node()));
|
||||
node_algorithms::transfer(p.pointed_node(), f.pointed_node(), e.pointed_node());
|
||||
size_traits &thist = this->priv_size_traits();
|
||||
@@ -988,19 +991,19 @@ class list_impl
|
||||
}
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: This function sorts the list *this according to std::less<value_type>.
|
||||
//! <b>Effects</b>: This function sorts the list *this according to operator <.
|
||||
//! The sort is stable, that is, the relative order of equivalent elements is preserved.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
//! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
|
||||
//! or std::less<value_type> throws. Basic guarantee.
|
||||
//! or operator < throws. Basic guarantee.
|
||||
//!
|
||||
//! <b>Notes</b>: Iterators and references are not invalidated.
|
||||
//!
|
||||
//! <b>Complexity</b>: The number of comparisons is approximately N log N, where N
|
||||
//! is the list's size.
|
||||
void sort()
|
||||
{ this->sort(std::less<value_type>()); }
|
||||
{ this->sort(value_less<value_type>()); }
|
||||
|
||||
//! <b>Requires</b>: p must be a comparison function that induces a strict weak ordering
|
||||
//!
|
||||
@@ -1043,18 +1046,18 @@ class list_impl
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: This function removes all of x's elements and inserts them
|
||||
//! in order into *this according to std::less<value_type>. The merge is stable;
|
||||
//! in order into *this according to operator <. The merge is stable;
|
||||
//! that is, if an element from *this is equivalent to one from x, then the element
|
||||
//! from *this will precede the one from x.
|
||||
//!
|
||||
//! <b>Throws</b>: If std::less<value_type> throws. Basic guarantee.
|
||||
//! <b>Throws</b>: If operator < throws. Basic guarantee.
|
||||
//!
|
||||
//! <b>Complexity</b>: This function is linear time: it performs at most
|
||||
//! size() + x.size() - 1 comparisons.
|
||||
//!
|
||||
//! <b>Note</b>: Iterators and references are not invalidated
|
||||
void merge(list_impl& x)
|
||||
{ this->merge(x, std::less<value_type>()); }
|
||||
{ this->merge(x, value_less<value_type>()); }
|
||||
|
||||
//! <b>Requires</b>: p must be a comparison function that induces a strict weak
|
||||
//! ordering and both *this and x must be sorted according to that ordering
|
||||
@@ -1102,19 +1105,19 @@ class list_impl
|
||||
//! <b>Complexity</b>: This function is linear time.
|
||||
//!
|
||||
//! <b>Note</b>: Iterators and references are not invalidated
|
||||
void reverse()
|
||||
void reverse() BOOST_NOEXCEPT
|
||||
{ node_algorithms::reverse(this->get_root_node()); }
|
||||
|
||||
//! <b>Effects</b>: Removes all the elements that compare equal to value.
|
||||
//! No destructors are called.
|
||||
//!
|
||||
//! <b>Throws</b>: If std::equal_to<value_type> throws. Basic guarantee.
|
||||
//! <b>Throws</b>: If operator == throws. Basic guarantee.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear time. It performs exactly size() comparisons for equality.
|
||||
//!
|
||||
//! <b>Note</b>: The relative order of elements that are not removed is unchanged,
|
||||
//! and iterators to elements that are not removed remain valid.
|
||||
void remove(const_reference value)
|
||||
void remove(const_reference value) BOOST_NOEXCEPT
|
||||
{ this->remove_if(detail::equal_to_value<const_reference>(value)); }
|
||||
|
||||
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
|
||||
@@ -1122,14 +1125,14 @@ class list_impl
|
||||
//! <b>Effects</b>: Removes all the elements that compare equal to value.
|
||||
//! Disposer::operator()(pointer) is called for every removed element.
|
||||
//!
|
||||
//! <b>Throws</b>: If std::equal_to<value_type> throws. Basic guarantee.
|
||||
//! <b>Throws</b>: If operator == throws. Basic guarantee.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear time. It performs exactly size() comparisons for equality.
|
||||
//!
|
||||
//! <b>Note</b>: The relative order of elements that are not removed is unchanged,
|
||||
//! and iterators to elements that are not removed remain valid.
|
||||
template<class Disposer>
|
||||
void remove_and_dispose(const_reference value, Disposer disposer)
|
||||
void remove_and_dispose(const_reference value, Disposer disposer) BOOST_NOEXCEPT
|
||||
{ this->remove_and_dispose_if(detail::equal_to_value<const_reference>(value), disposer); }
|
||||
|
||||
//! <b>Effects</b>: Removes all the elements for which a specified
|
||||
@@ -1267,7 +1270,7 @@ class list_impl
|
||||
//! <b>Note</b>: Iterators and references are not invalidated.
|
||||
//! This static function is available only if the <i>value traits</i>
|
||||
//! is stateless.
|
||||
static iterator s_iterator_to(reference value)
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!stateful_value_traits));
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(value_traits::to_node_ptr(value)));
|
||||
@@ -1285,7 +1288,7 @@ class list_impl
|
||||
//! <b>Note</b>: Iterators and references are not invalidated.
|
||||
//! This static function is available only if the <i>value traits</i>
|
||||
//! is stateless.
|
||||
static const_iterator s_iterator_to(const_reference value)
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!stateful_value_traits));
|
||||
reference r =*detail::uncast(pointer_traits<const_pointer>::pointer_to(value));
|
||||
@@ -1302,7 +1305,7 @@ class list_impl
|
||||
//! <b>Complexity</b>: Constant time.
|
||||
//!
|
||||
//! <b>Note</b>: Iterators and references are not invalidated.
|
||||
iterator iterator_to(reference value)
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(this->priv_value_traits().to_node_ptr(value)));
|
||||
return iterator(this->priv_value_traits().to_node_ptr(value), this->priv_value_traits_ptr());
|
||||
@@ -1317,7 +1320,7 @@ class list_impl
|
||||
//! <b>Complexity</b>: Constant time.
|
||||
//!
|
||||
//! <b>Note</b>: Iterators and references are not invalidated.
|
||||
const_iterator iterator_to(const_reference value) const
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT
|
||||
{
|
||||
reference r = *detail::uncast(pointer_traits<const_pointer>::pointer_to(value));
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(this->priv_value_traits().to_node_ptr(r)));
|
||||
@@ -1341,11 +1344,11 @@ class list_impl
|
||||
== (node_traits::get_previous(header_ptr) == header_ptr));
|
||||
if (node_traits::get_next(header_ptr) == header_ptr)
|
||||
{
|
||||
if (constant_time_size)
|
||||
BOOST_IF_CONSTEXPR(constant_time_size)
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(this->priv_size_traits().get_size() == 0);
|
||||
return;
|
||||
}
|
||||
size_t node_count = 0;
|
||||
size_t node_count = 0; (void)node_count;
|
||||
const_node_ptr p = header_ptr;
|
||||
while (true)
|
||||
{
|
||||
@@ -1356,7 +1359,7 @@ class list_impl
|
||||
if (p == header_ptr) break;
|
||||
++node_count;
|
||||
}
|
||||
if (constant_time_size)
|
||||
BOOST_IF_CONSTEXPR(constant_time_size)
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(this->priv_size_traits().get_size() == node_count);
|
||||
}
|
||||
|
||||
@@ -1368,28 +1371,28 @@ class list_impl
|
||||
return ::boost::intrusive::algo_equal(x.cbegin(), x.cend(), y.cbegin(), y.cend());
|
||||
}
|
||||
|
||||
friend bool operator!=(const list_impl &x, const list_impl &y)
|
||||
BOOST_INTRUSIVE_FORCEINLINE friend bool operator!=(const list_impl &x, const list_impl &y)
|
||||
{ return !(x == y); }
|
||||
|
||||
friend bool operator<(const list_impl &x, const list_impl &y)
|
||||
BOOST_INTRUSIVE_FORCEINLINE friend bool operator<(const list_impl &x, const list_impl &y)
|
||||
{ return ::boost::intrusive::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
|
||||
|
||||
friend bool operator>(const list_impl &x, const list_impl &y)
|
||||
BOOST_INTRUSIVE_FORCEINLINE friend bool operator>(const list_impl &x, const list_impl &y)
|
||||
{ return y < x; }
|
||||
|
||||
friend bool operator<=(const list_impl &x, const list_impl &y)
|
||||
BOOST_INTRUSIVE_FORCEINLINE friend bool operator<=(const list_impl &x, const list_impl &y)
|
||||
{ return !(y < x); }
|
||||
|
||||
friend bool operator>=(const list_impl &x, const list_impl &y)
|
||||
BOOST_INTRUSIVE_FORCEINLINE friend bool operator>=(const list_impl &x, const list_impl &y)
|
||||
{ return !(x < y); }
|
||||
|
||||
friend void swap(list_impl &x, list_impl &y)
|
||||
BOOST_INTRUSIVE_FORCEINLINE friend void swap(list_impl &x, list_impl &y) BOOST_NOEXCEPT
|
||||
{ x.swap(y); }
|
||||
|
||||
/// @cond
|
||||
|
||||
private:
|
||||
static list_impl &priv_container_from_end_iterator(const const_iterator &end_iterator)
|
||||
static list_impl &priv_container_from_end_iterator(const const_iterator &end_iterator) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((has_container_from_iterator));
|
||||
node_ptr p = end_iterator.pointed_node();
|
||||
@@ -1499,10 +1502,10 @@ class list
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(list) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static list &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static list &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<list &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const list &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const list &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const list &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ class list_base_hook
|
||||
//! initializes the node to an unlinked state.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
list_base_hook();
|
||||
list_base_hook() BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
|
||||
//! initializes the node to an unlinked state. The argument is ignored.
|
||||
@@ -107,7 +107,7 @@ class list_base_hook
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
list_base_hook(const list_base_hook& );
|
||||
list_base_hook(const list_base_hook& ) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Empty function. The argument is ignored.
|
||||
//!
|
||||
@@ -117,7 +117,7 @@ class list_base_hook
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
list_base_hook& operator=(const list_base_hook& );
|
||||
list_base_hook& operator=(const list_base_hook& ) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c normal_link, the destructor does
|
||||
//! nothing (ie. no code is generated). If link_mode is \c safe_link and the
|
||||
@@ -139,7 +139,7 @@ class list_base_hook
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void swap_nodes(list_base_hook &other);
|
||||
void swap_nodes(list_base_hook &other) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Precondition</b>: link_mode must be \c safe_link or \c auto_unlink.
|
||||
//!
|
||||
@@ -154,7 +154,7 @@ class list_base_hook
|
||||
//! This function is only allowed if link_mode is \c auto_unlink.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void unlink();
|
||||
void unlink() BOOST_NOEXCEPT;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -219,7 +219,7 @@ class list_member_hook
|
||||
//! initializes the node to an unlinked state.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
list_member_hook();
|
||||
list_member_hook() BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
|
||||
//! initializes the node to an unlinked state. The argument is ignored.
|
||||
@@ -230,7 +230,7 @@ class list_member_hook
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
list_member_hook(const list_member_hook& );
|
||||
list_member_hook(const list_member_hook& ) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Empty function. The argument is ignored.
|
||||
//!
|
||||
@@ -240,7 +240,7 @@ class list_member_hook
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
list_member_hook& operator=(const list_member_hook& );
|
||||
list_member_hook& operator=(const list_member_hook& ) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c normal_link, the destructor does
|
||||
//! nothing (ie. no code is generated). If link_mode is \c safe_link and the
|
||||
@@ -262,7 +262,7 @@ class list_member_hook
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void swap_nodes(list_member_hook &other);
|
||||
void swap_nodes(list_member_hook &other) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Precondition</b>: link_mode must be \c safe_link or \c auto_unlink.
|
||||
//!
|
||||
@@ -277,7 +277,7 @@ class list_member_hook
|
||||
//! This function is only allowed if link_mode is \c auto_unlink.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void unlink();
|
||||
void unlink() BOOST_NOEXCEPT;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -57,19 +57,19 @@ struct member_value_traits
|
||||
typedef const value_type & const_reference;
|
||||
static const link_mode_type link_mode = LinkMode;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr to_node_ptr(reference value)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr to_node_ptr(reference value) BOOST_NOEXCEPT
|
||||
{ return pointer_traits<node_ptr>::pointer_to(value.*PtrToMember); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_node_ptr to_node_ptr(const_reference value)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_node_ptr to_node_ptr(const_reference value) BOOST_NOEXCEPT
|
||||
{ return pointer_traits<const_node_ptr>::pointer_to(value.*PtrToMember); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(const node_ptr &n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
return pointer_traits<pointer>::pointer_to(*detail::parent_from_member<value_type, node>
|
||||
(boost::movelib::to_raw_pointer(n), PtrToMember));
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const const_node_ptr &n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const_node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
return pointer_traits<const_pointer>::pointer_to(*detail::parent_from_member<value_type, node>
|
||||
(boost::movelib::to_raw_pointer(n), PtrToMember));
|
||||
|
||||
@@ -212,13 +212,22 @@ BOOST_INTRUSIVE_OPTION_CONSTANT(store_hash, bool, Enabled, store_hash)
|
||||
//!with the same key.
|
||||
BOOST_INTRUSIVE_OPTION_CONSTANT(optimize_multikey, bool, Enabled, optimize_multikey)
|
||||
|
||||
//!This option setter specifies if the bucket array will be always power of two.
|
||||
//!This option setter specifies if the length of the bucket array provided by
|
||||
//!the user will always be power of two.
|
||||
//!This allows using masks instead of the default modulo operation to determine
|
||||
//!the bucket number from the hash value, leading to better performance.
|
||||
//!In debug mode, if power of two buckets mode is activated, the bucket length
|
||||
//!will be checked with assertions.
|
||||
//!In debug mode, the provided bucket array length will be checked with assertions.
|
||||
BOOST_INTRUSIVE_OPTION_CONSTANT(power_2_buckets, bool, Enabled, power_2_buckets)
|
||||
|
||||
//!WARNING: this option is EXPERIMENTAL, don't use it in production code
|
||||
//!This option setter specifies if the length of the bucket array provided by
|
||||
//!the user will always be a value specified by the
|
||||
//!suggested_upper|lower_bucket_count call. This allows the use of some
|
||||
//!precomputed values and speeds hash to bucket index operations, leading
|
||||
//!to better performance.
|
||||
//!In debug mode, the provided bucket array length will be checked with assertions.
|
||||
BOOST_INTRUSIVE_OPTION_CONSTANT(fastmod_buckets, bool, Enabled, fastmod_buckets)
|
||||
|
||||
//!This option setter specifies if the container will cache a pointer to the first
|
||||
//!non-empty bucket so that begin() is always constant-time.
|
||||
//!This is specially helpful when we can have containers with a few elements
|
||||
@@ -241,6 +250,11 @@ BOOST_INTRUSIVE_OPTION_CONSTANT(compare_hash, bool, Enabled, compare_hash)
|
||||
//!(rehashing the whole bucket array) is not admisible.
|
||||
BOOST_INTRUSIVE_OPTION_CONSTANT(incremental, bool, Enabled, incremental)
|
||||
|
||||
//!This option setter specifies if the buckets (which form a singly linked lists of nodes)
|
||||
//!are linear (true) or circular (false, default value). Linear buckets can improve performance
|
||||
//!in some cases, but the container loses some features like obtaining an iterator from a value.
|
||||
BOOST_INTRUSIVE_OPTION_CONSTANT(linear_buckets, bool, Enabled, linear_buckets)
|
||||
|
||||
/// @cond
|
||||
|
||||
struct hook_defaults
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
|
||||
@@ -97,19 +99,19 @@ struct pack_options
|
||||
#else
|
||||
|
||||
//index_tuple
|
||||
template<int... Indexes>
|
||||
template<std::size_t... Indexes>
|
||||
struct index_tuple{};
|
||||
|
||||
//build_number_seq
|
||||
template<std::size_t Num, typename Tuple = index_tuple<> >
|
||||
struct build_number_seq;
|
||||
|
||||
template<std::size_t Num, int... Indexes>
|
||||
template<std::size_t Num, std::size_t... Indexes>
|
||||
struct build_number_seq<Num, index_tuple<Indexes...> >
|
||||
: build_number_seq<Num - 1, index_tuple<Indexes..., sizeof...(Indexes)> >
|
||||
{};
|
||||
|
||||
template<int... Indexes>
|
||||
template<std::size_t... Indexes>
|
||||
struct build_number_seq<0, index_tuple<Indexes...> >
|
||||
{ typedef index_tuple<Indexes...> type; };
|
||||
|
||||
@@ -121,10 +123,10 @@ struct typelist
|
||||
template<class T>
|
||||
struct invert_typelist;
|
||||
|
||||
template<int I, typename Tuple>
|
||||
template<std::size_t I, typename Tuple>
|
||||
struct typelist_element;
|
||||
|
||||
template<int I, typename Head, typename... Tail>
|
||||
template<std::size_t I, typename Head, typename... Tail>
|
||||
struct typelist_element<I, typelist<Head, Tail...> >
|
||||
{
|
||||
typedef typename typelist_element<I-1, typelist<Tail...> >::type type;
|
||||
@@ -136,7 +138,7 @@ struct typelist_element<0, typelist<Head, Tail...> >
|
||||
typedef Head type;
|
||||
};
|
||||
|
||||
template<int ...Ints, class ...Types>
|
||||
template<std::size_t ...Ints, class ...Types>
|
||||
typelist<typename typelist_element<(sizeof...(Types) - 1) - Ints, typelist<Types...> >::type...>
|
||||
inverted_typelist(index_tuple<Ints...>, typelist<Types...>)
|
||||
{
|
||||
@@ -158,7 +160,7 @@ template<class Typelist, class Indexes>
|
||||
struct invert_typelist_impl;
|
||||
|
||||
|
||||
template<class Typelist, int ...Ints>
|
||||
template<class Typelist, std::size_t ...Ints>
|
||||
struct invert_typelist_impl< Typelist, index_tuple<Ints...> >
|
||||
{
|
||||
static const std::size_t last_idx = sizeof_typelist<Typelist>::value - 1;
|
||||
@@ -166,7 +168,7 @@ struct invert_typelist_impl< Typelist, index_tuple<Ints...> >
|
||||
<typename typelist_element<last_idx - Ints, Typelist>::type...> type;
|
||||
};
|
||||
|
||||
template<class Typelist, int Int>
|
||||
template<class Typelist, std::size_t Int>
|
||||
struct invert_typelist_impl< Typelist, index_tuple<Int> >
|
||||
{
|
||||
typedef Typelist type;
|
||||
@@ -209,6 +211,12 @@ struct do_pack<typelist<Prev, Last> >
|
||||
typedef typename Prev::template pack<Last> type;
|
||||
};
|
||||
|
||||
template<class ...Others>
|
||||
struct do_pack<typelist<void, Others...> >
|
||||
{
|
||||
typedef typename do_pack<typelist<Others...> >::type type;
|
||||
};
|
||||
|
||||
template<class Prev, class ...Others>
|
||||
struct do_pack<typelist<Prev, Others...> >
|
||||
{
|
||||
@@ -243,6 +251,8 @@ struct OPTION_NAME \
|
||||
template< TYPE VALUE> \
|
||||
struct OPTION_NAME \
|
||||
{ \
|
||||
static const TYPE value = VALUE; \
|
||||
\
|
||||
template<class Base> \
|
||||
struct pack : Base \
|
||||
{ \
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace intrusive {
|
||||
//! Note: this function does not work with pointer to members that rely on
|
||||
//! virtual inheritance.
|
||||
template<class Parent, class Member>
|
||||
BOOST_INTRUSIVE_FORCEINLINE Parent *get_parent_from_member(Member *member, const Member Parent::* ptr_to_member)
|
||||
BOOST_INTRUSIVE_FORCEINLINE Parent *get_parent_from_member(Member *member, const Member Parent::* ptr_to_member) BOOST_NOEXCEPT
|
||||
{ return ::boost::intrusive::detail::parent_from_member(member, ptr_to_member); }
|
||||
|
||||
//! Given a const pointer to a member and its corresponding const pointer to data member,
|
||||
@@ -38,7 +38,7 @@ BOOST_INTRUSIVE_FORCEINLINE Parent *get_parent_from_member(Member *member, const
|
||||
//! Note: this function does not work with pointer to members that rely on
|
||||
//! virtual inheritance.
|
||||
template<class Parent, class Member>
|
||||
BOOST_INTRUSIVE_FORCEINLINE const Parent *get_parent_from_member(const Member *member, const Member Parent::* ptr_to_member)
|
||||
BOOST_INTRUSIVE_FORCEINLINE const Parent *get_parent_from_member(const Member *member, const Member Parent::* ptr_to_member) BOOST_NOEXCEPT
|
||||
{ return ::boost::intrusive::detail::parent_from_member(member, ptr_to_member); }
|
||||
|
||||
} //namespace intrusive {
|
||||
|
||||
@@ -81,19 +81,19 @@ struct pointer_plus_bits<T*, NumBits>
|
||||
static const uintptr_t Mask = uintptr_t((uintptr_t(1u) << NumBits) - 1);
|
||||
typedef T* pointer;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer get_pointer(pointer n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer get_pointer(pointer n) BOOST_NOEXCEPT
|
||||
{ return pointer(uintptr_t(n) & uintptr_t(~Mask)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_pointer(pointer &n, pointer p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_pointer(pointer &n, pointer p) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(0 == (uintptr_t(p) & Mask));
|
||||
n = pointer(uintptr_t(p) | (uintptr_t(n) & Mask));
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static std::size_t get_bits(pointer n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static std::size_t get_bits(pointer n) BOOST_NOEXCEPT
|
||||
{ return std::size_t(uintptr_t(n) & Mask); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_bits(pointer &n, std::size_t c)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_bits(pointer &n, std::size_t c) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(uintptr_t(c) <= Mask);
|
||||
n = pointer(uintptr_t((get_pointer)(n)) | uintptr_t(c));
|
||||
|
||||
@@ -46,6 +46,7 @@ BOOST_INTRUSIVE_HAS_MEMBER_FUNC_CALLED_IGNORE_SIGNATURE(has_member_function_call
|
||||
|
||||
BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(element_type)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(size_type)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(value_traits_ptr)
|
||||
|
||||
@@ -103,7 +104,13 @@ struct pointer_traits
|
||||
(boost::intrusive::detail::, Ptr, difference_type, std::ptrdiff_t) difference_type;
|
||||
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
|
||||
(boost::intrusive::detail::, Ptr, reference, typename boost::intrusive::detail::unvoid_ref<element_type>::type) reference;
|
||||
( boost::intrusive::detail::, Ptr, size_type
|
||||
, typename boost::move_detail::
|
||||
make_unsigned<difference_type>::type) size_type;
|
||||
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
|
||||
( boost::intrusive::detail::, Ptr, reference
|
||||
, typename boost::intrusive::detail::unvoid_ref<element_type>::type) reference;
|
||||
//
|
||||
template <class U> struct rebind_pointer
|
||||
{
|
||||
@@ -123,7 +130,7 @@ struct pointer_traits
|
||||
//!
|
||||
//! <b>Note</b>: For non-conforming compilers only the existence of a member function called
|
||||
//! <code>pointer_to</code> is checked.
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer pointer_to(reference r)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer pointer_to(reference r) BOOST_NOEXCEPT
|
||||
{
|
||||
//Non-standard extension, it does not require Ptr::pointer_to. If not present
|
||||
//tries to converts &r to pointer.
|
||||
@@ -143,7 +150,7 @@ struct pointer_traits
|
||||
//! <b>Note</b>: For non-conforming compilers only the existence of a member function called
|
||||
//! <code>static_cast_from</code> is checked.
|
||||
template<class UPtr>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer static_cast_from(const UPtr &uptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer static_cast_from(const UPtr &uptr) BOOST_NOEXCEPT
|
||||
{
|
||||
typedef const UPtr &RefArg;
|
||||
const bool value = boost::intrusive::detail::
|
||||
@@ -164,7 +171,7 @@ struct pointer_traits
|
||||
//! <b>Note</b>: For non-conforming compilers only the existence of a member function called
|
||||
//! <code>const_cast_from</code> is checked.
|
||||
template<class UPtr>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer const_cast_from(const UPtr &uptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer const_cast_from(const UPtr &uptr) BOOST_NOEXCEPT
|
||||
{
|
||||
typedef const UPtr &RefArg;
|
||||
const bool value = boost::intrusive::detail::
|
||||
@@ -185,7 +192,7 @@ struct pointer_traits
|
||||
//! <b>Note</b>: For non-conforming compilers only the existence of a member function called
|
||||
//! <code>dynamic_cast_from</code> is checked.
|
||||
template<class UPtr>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer dynamic_cast_from(const UPtr &uptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer dynamic_cast_from(const UPtr &uptr) BOOST_NOEXCEPT
|
||||
{
|
||||
typedef const UPtr &RefArg;
|
||||
const bool value = boost::intrusive::detail::
|
||||
@@ -201,46 +208,46 @@ struct pointer_traits
|
||||
private:
|
||||
//priv_to_raw_pointer
|
||||
template <class T>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static T* to_raw_pointer(T* p)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static T* to_raw_pointer(T* p) BOOST_NOEXCEPT
|
||||
{ return p; }
|
||||
|
||||
template <class Pointer>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static typename pointer_traits<Pointer>::element_type*
|
||||
to_raw_pointer(const Pointer &p)
|
||||
to_raw_pointer(const Pointer &p) BOOST_NOEXCEPT
|
||||
{ return pointer_traits::to_raw_pointer(p.operator->()); }
|
||||
|
||||
//priv_pointer_to
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_pointer_to(boost::intrusive::detail::true_, reference r)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_pointer_to(boost::intrusive::detail::true_, reference r) BOOST_NOEXCEPT
|
||||
{ return Ptr::pointer_to(r); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_pointer_to(boost::intrusive::detail::false_, reference r)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_pointer_to(boost::intrusive::detail::false_, reference r) BOOST_NOEXCEPT
|
||||
{ return pointer(boost::intrusive::detail::addressof(r)); }
|
||||
|
||||
//priv_static_cast_from
|
||||
template<class UPtr>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_static_cast_from(boost::intrusive::detail::true_, const UPtr &uptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_static_cast_from(boost::intrusive::detail::true_, const UPtr &uptr) BOOST_NOEXCEPT
|
||||
{ return Ptr::static_cast_from(uptr); }
|
||||
|
||||
template<class UPtr>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_static_cast_from(boost::intrusive::detail::false_, const UPtr &uptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_static_cast_from(boost::intrusive::detail::false_, const UPtr &uptr) BOOST_NOEXCEPT
|
||||
{ return uptr ? pointer_to(*static_cast<element_type*>(to_raw_pointer(uptr))) : pointer(); }
|
||||
|
||||
//priv_const_cast_from
|
||||
template<class UPtr>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_const_cast_from(boost::intrusive::detail::true_, const UPtr &uptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_const_cast_from(boost::intrusive::detail::true_, const UPtr &uptr) BOOST_NOEXCEPT
|
||||
{ return Ptr::const_cast_from(uptr); }
|
||||
|
||||
template<class UPtr>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_const_cast_from(boost::intrusive::detail::false_, const UPtr &uptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_const_cast_from(boost::intrusive::detail::false_, const UPtr &uptr) BOOST_NOEXCEPT
|
||||
{ return uptr ? pointer_to(const_cast<element_type&>(*uptr)) : pointer(); }
|
||||
|
||||
//priv_dynamic_cast_from
|
||||
template<class UPtr>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_dynamic_cast_from(boost::intrusive::detail::true_, const UPtr &uptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_dynamic_cast_from(boost::intrusive::detail::true_, const UPtr &uptr) BOOST_NOEXCEPT
|
||||
{ return Ptr::dynamic_cast_from(uptr); }
|
||||
|
||||
template<class UPtr>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_dynamic_cast_from(boost::intrusive::detail::false_, const UPtr &uptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer priv_dynamic_cast_from(boost::intrusive::detail::false_, const UPtr &uptr) BOOST_NOEXCEPT
|
||||
{ return uptr ? pointer_to(dynamic_cast<element_type&>(*uptr)) : pointer(); }
|
||||
///@endcond
|
||||
};
|
||||
@@ -265,9 +272,10 @@ struct pointer_traits<Ptr&> : pointer_traits<Ptr> { };
|
||||
template <typename T>
|
||||
struct pointer_traits<T*>
|
||||
{
|
||||
typedef T element_type;
|
||||
typedef T* pointer;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef T element_type;
|
||||
typedef T* pointer;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef std::size_t size_type;
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
typedef T & reference;
|
||||
@@ -288,25 +296,25 @@ struct pointer_traits<T*>
|
||||
|
||||
//! <b>Returns</b>: addressof(r)
|
||||
//!
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer pointer_to(reference r)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer pointer_to(reference r) BOOST_NOEXCEPT
|
||||
{ return boost::intrusive::detail::addressof(r); }
|
||||
|
||||
//! <b>Returns</b>: static_cast<pointer>(uptr)
|
||||
//!
|
||||
template<class U>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer static_cast_from(U *uptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer static_cast_from(U *uptr) BOOST_NOEXCEPT
|
||||
{ return static_cast<pointer>(uptr); }
|
||||
|
||||
//! <b>Returns</b>: const_cast<pointer>(uptr)
|
||||
//!
|
||||
template<class U>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer const_cast_from(U *uptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer const_cast_from(U *uptr) BOOST_NOEXCEPT
|
||||
{ return const_cast<pointer>(uptr); }
|
||||
|
||||
//! <b>Returns</b>: dynamic_cast<pointer>(uptr)
|
||||
//!
|
||||
template<class U>
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer dynamic_cast_from(U *uptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer dynamic_cast_from(U *uptr) BOOST_NOEXCEPT
|
||||
{ return dynamic_cast<pointer>(uptr); }
|
||||
};
|
||||
|
||||
|
||||
@@ -28,8 +28,13 @@ namespace intrusive {
|
||||
|
||||
/// @cond
|
||||
|
||||
template<class U>
|
||||
void priority_order();
|
||||
namespace adldft {
|
||||
|
||||
template<class T, class U>
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool priority_order(const T &t, const U &u)
|
||||
{ return t < u; }
|
||||
|
||||
} //namespace adldft {
|
||||
|
||||
/// @endcond
|
||||
|
||||
@@ -43,6 +48,7 @@ struct priority_compare
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T &val, const T &val2) const
|
||||
{
|
||||
using adldft::priority_order;
|
||||
return priority_order(val, val2);
|
||||
}
|
||||
};
|
||||
@@ -53,6 +59,7 @@ struct priority_compare<void>
|
||||
template<class T, class U>
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T &t, const U &u) const
|
||||
{
|
||||
using adldft::priority_order;
|
||||
return priority_order(t, u);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -153,61 +153,61 @@ class rbtree_impl
|
||||
~rbtree_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
|
||||
static rbtree_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static rbtree_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
|
||||
static const rbtree_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const rbtree_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
|
||||
static rbtree_impl &container_from_iterator(iterator it);
|
||||
static rbtree_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
|
||||
static const rbtree_impl &container_from_iterator(const_iterator it);
|
||||
static const rbtree_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -216,10 +216,10 @@ class rbtree_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::swap
|
||||
void swap(rbtree_impl& other);
|
||||
@@ -281,26 +281,26 @@ class rbtree_impl
|
||||
(const_iterator hint, const key_type &key, insert_commit_data &commit_data);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::insert_unique_commit
|
||||
iterator insert_unique_commit(reference value, const insert_commit_data &commit_data);
|
||||
iterator insert_unique_commit(reference value, const insert_commit_data &commit_data) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::insert_unique(Iterator,Iterator)
|
||||
template<class Iterator>
|
||||
void insert_unique(Iterator b, Iterator e);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value);
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::push_back
|
||||
void push_back(reference value);
|
||||
void push_back(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::push_front
|
||||
void push_front(reference value);
|
||||
void push_front(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
|
||||
iterator erase(const_iterator i);
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e);
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const key_type &key)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -311,11 +311,11 @@ class rbtree_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
|
||||
template<class Disposer>
|
||||
@@ -326,11 +326,11 @@ class rbtree_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
|
||||
size_type count(const key_type &key) const;
|
||||
@@ -416,28 +416,28 @@ class rbtree_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::merge_unique(bstree<T, Options2...>&)
|
||||
template<class T, class ...Options2>
|
||||
@@ -568,16 +568,16 @@ class rbtree
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(rbtree) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static rbtree &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static rbtree &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<rbtree &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const rbtree &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const rbtree &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const rbtree &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static rbtree &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static rbtree &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<rbtree &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const rbtree &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const rbtree &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const rbtree &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ struct rbtree_node_cloner
|
||||
: base_t(f)
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE node_ptr operator()(node_ptr p)
|
||||
node_ptr operator()(node_ptr p)
|
||||
{
|
||||
node_ptr n = base_t::get()(p);
|
||||
NodeTraits::set_color(n, NodeTraits::get_color(p));
|
||||
@@ -85,7 +85,7 @@ struct rbtree_node_checker
|
||||
: base_checker_t(comp, extra_checker)
|
||||
{}
|
||||
|
||||
void operator () (const const_node_ptr& p,
|
||||
void operator () (const_node_ptr p,
|
||||
const return_type& check_return_left, const return_type& check_return_right,
|
||||
return_type& check_return)
|
||||
{
|
||||
@@ -190,22 +190,22 @@ class rbtree_algorithms
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
|
||||
static node_ptr get_header(const const_node_ptr & n);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const_node_ptr)
|
||||
static node_ptr get_header(const_node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
|
||||
static node_ptr begin_node(const const_node_ptr & header);
|
||||
static node_ptr begin_node(const_node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::end_node
|
||||
static node_ptr end_node(const const_node_ptr & header);
|
||||
static node_ptr end_node(const_node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
|
||||
static void swap_tree(node_ptr header1, node_ptr header2);
|
||||
static void swap_tree(node_ptr header1, node_ptr header2) BOOST_NOEXCEPT;
|
||||
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr)
|
||||
static void swap_nodes(node_ptr node1, node_ptr node2)
|
||||
static void swap_nodes(node_ptr node1, node_ptr node2) BOOST_NOEXCEPT
|
||||
{
|
||||
if(node1 == node2)
|
||||
return;
|
||||
@@ -215,7 +215,7 @@ class rbtree_algorithms
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr,node_ptr,node_ptr)
|
||||
static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2)
|
||||
static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2) BOOST_NOEXCEPT
|
||||
{
|
||||
if(node1 == node2) return;
|
||||
|
||||
@@ -227,7 +227,7 @@ class rbtree_algorithms
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr)
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node)
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node) BOOST_NOEXCEPT
|
||||
{
|
||||
if(node_to_be_replaced == new_node)
|
||||
return;
|
||||
@@ -235,52 +235,52 @@ class rbtree_algorithms
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr,node_ptr)
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node)
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::replace_node(node_to_be_replaced, header, new_node);
|
||||
NodeTraits::set_color(new_node, NodeTraits::get_color(node_to_be_replaced));
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unlink(node_ptr)
|
||||
static void unlink(const node_ptr& node)
|
||||
static void unlink(node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr x = NodeTraits::get_parent(node);
|
||||
node_ptr x = NodeTraits::get_parent(n);
|
||||
if(x){
|
||||
while(!is_header(x))
|
||||
x = NodeTraits::get_parent(x);
|
||||
erase(x, node);
|
||||
erase(x, n);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
|
||||
static node_ptr unlink_leftmost_without_rebalance(const node_ptr & header);
|
||||
static node_ptr unlink_leftmost_without_rebalance(node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
|
||||
static bool unique(const const_node_ptr & node);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const_node_ptr)
|
||||
static bool unique(const_node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
|
||||
static std::size_t size(const const_node_ptr & header);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::size(const_node_ptr)
|
||||
static std::size_t size(const_node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
|
||||
static node_ptr next_node(const node_ptr & node);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const_node_ptr)
|
||||
static node_ptr next_node(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
|
||||
static node_ptr prev_node(const node_ptr & node);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const_node_ptr)
|
||||
static node_ptr prev_node(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::init(node_ptr)
|
||||
static void init(const node_ptr & node);
|
||||
static void init(node_ptr n) BOOST_NOEXCEPT;
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::init_header(node_ptr)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init_header(node_ptr header)
|
||||
static void init_header(node_ptr header) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::init_header(header);
|
||||
NodeTraits::set_color(header, NodeTraits::red());
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::erase(node_ptr,node_ptr)
|
||||
static node_ptr erase(node_ptr header, node_ptr z)
|
||||
static node_ptr erase(node_ptr header, node_ptr z) BOOST_NOEXCEPT
|
||||
{
|
||||
typename bstree_algo::data_for_rebalance info;
|
||||
bstree_algo::erase(header, z, info);
|
||||
@@ -313,7 +313,7 @@ class rbtree_algorithms
|
||||
rebalance_after_insertion(header1, z);
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,node_ptr,Cloner,Disposer)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clone(const_node_ptr,node_ptr,Cloner,Disposer)
|
||||
template <class Cloner, class Disposer>
|
||||
static void clone
|
||||
(const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer)
|
||||
@@ -323,39 +323,39 @@ class rbtree_algorithms
|
||||
}
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const_node_ptr,Disposer)
|
||||
template<class Disposer>
|
||||
static void clear_and_dispose(const node_ptr & header, Disposer disposer);
|
||||
static void clear_and_dispose(node_ptr header, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr lower_bound
|
||||
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr upper_bound
|
||||
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::find(const_node_ptr, const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr find
|
||||
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> equal_range
|
||||
(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const_node_ptr,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> bounded_range
|
||||
(const const_node_ptr & header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
|
||||
(const_node_ptr eader, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
|
||||
, bool left_closed, bool right_closed);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::count(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::size_t count(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
static std::size_t count(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
@@ -391,7 +391,7 @@ class rbtree_algorithms
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_before(node_ptr,node_ptr,node_ptr)
|
||||
static node_ptr insert_before
|
||||
(node_ptr header, node_ptr pos, node_ptr new_node)
|
||||
(node_ptr header, node_ptr pos, node_ptr new_node) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::insert_before(header, pos, new_node);
|
||||
rebalance_after_insertion(header, new_node);
|
||||
@@ -399,27 +399,27 @@ class rbtree_algorithms
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::push_back(node_ptr,node_ptr)
|
||||
static void push_back(node_ptr header, node_ptr new_node)
|
||||
static void push_back(node_ptr header, node_ptr new_node) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::push_back(header, new_node);
|
||||
rebalance_after_insertion(header, new_node);
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::push_front(node_ptr,node_ptr)
|
||||
static void push_front(node_ptr header, node_ptr new_node)
|
||||
static void push_front(node_ptr header, node_ptr new_node) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::push_front(header, new_node);
|
||||
rebalance_after_insertion(header, new_node);
|
||||
}
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const_node_ptr,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, bool> insert_unique_check
|
||||
(const_node_ptr header, const KeyType &key
|
||||
,KeyNodePtrCompare comp, insert_commit_data &commit_data);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const_node_ptr,const_node_ptr,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, bool> insert_unique_check
|
||||
(const_node_ptr header, node_ptr hint, const KeyType &key
|
||||
@@ -428,14 +428,14 @@ class rbtree_algorithms
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_commit(node_ptr,node_ptr,const insert_commit_data&)
|
||||
static void insert_unique_commit
|
||||
(node_ptr header, node_ptr new_value, const insert_commit_data &commit_data)
|
||||
(node_ptr header, node_ptr new_value, const insert_commit_data &commit_data) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::insert_unique_commit(header, new_value, commit_data);
|
||||
rebalance_after_insertion(header, new_value);
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::is_header
|
||||
static bool is_header(const const_node_ptr & p)
|
||||
static bool is_header(const_node_ptr p) BOOST_NOEXCEPT
|
||||
{
|
||||
return NodeTraits::get_color(p) == NodeTraits::red() &&
|
||||
bstree_algo::is_header(p);
|
||||
@@ -445,7 +445,7 @@ class rbtree_algorithms
|
||||
private:
|
||||
|
||||
static void rebalance_after_erasure
|
||||
( node_ptr header, node_ptr z, const typename bstree_algo::data_for_rebalance &info)
|
||||
( node_ptr header, node_ptr z, const typename bstree_algo::data_for_rebalance &info) BOOST_NOEXCEPT
|
||||
{
|
||||
color new_z_color;
|
||||
if(info.y != z){
|
||||
@@ -461,7 +461,7 @@ class rbtree_algorithms
|
||||
}
|
||||
}
|
||||
|
||||
static void rebalance_after_erasure_restore_invariants(node_ptr header, node_ptr x, node_ptr x_parent)
|
||||
static void rebalance_after_erasure_restore_invariants(node_ptr header, node_ptr x, node_ptr x_parent) BOOST_NOEXCEPT
|
||||
{
|
||||
while(1){
|
||||
if(x_parent == header || (x && NodeTraits::get_color(x) != NodeTraits::black())){
|
||||
@@ -545,7 +545,7 @@ class rbtree_algorithms
|
||||
NodeTraits::set_color(x, NodeTraits::black());
|
||||
}
|
||||
|
||||
static void rebalance_after_insertion(node_ptr header, node_ptr p)
|
||||
static void rebalance_after_insertion(node_ptr header, node_ptr p) BOOST_NOEXCEPT
|
||||
{
|
||||
NodeTraits::set_color(p, NodeTraits::red());
|
||||
while(1){
|
||||
|
||||
@@ -120,61 +120,61 @@ class set_impl
|
||||
~set_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(iterator)
|
||||
static set_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static set_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(const_iterator)
|
||||
static const set_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const set_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::container_from_iterator(iterator)
|
||||
static set_impl &container_from_iterator(iterator it);
|
||||
static set_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::container_from_iterator(const_iterator)
|
||||
static const set_impl &container_from_iterator(const_iterator it);
|
||||
static const set_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -183,10 +183,10 @@ class set_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::swap
|
||||
void swap(set_impl& other);
|
||||
@@ -244,24 +244,24 @@ class set_impl
|
||||
{ tree_type::insert_unique(b, e); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::insert_unique_commit
|
||||
iterator insert_commit(reference value, const insert_commit_data &commit_data)
|
||||
iterator insert_commit(reference value, const insert_commit_data &commit_data) BOOST_NOEXCEPT
|
||||
{ return tree_type::insert_unique_commit(value, commit_data); }
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::rbtree::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value);
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::push_back
|
||||
void push_back(reference value);
|
||||
void push_back(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::push_front
|
||||
void push_front(reference value);
|
||||
void push_front(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::erase(const_iterator)
|
||||
iterator erase(const_iterator i);
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e);
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::erase(const key_type &)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -272,11 +272,11 @@ class set_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const key_type &, Disposer)
|
||||
template<class Disposer>
|
||||
@@ -287,11 +287,11 @@ class set_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
#endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
@@ -391,28 +391,28 @@ class set_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::merge_unique
|
||||
template<class ...Options2>
|
||||
@@ -555,16 +555,16 @@ class set
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(set) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static set &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static set &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<set &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const set &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const set &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const set &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static set &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static set &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<set &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const set &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const set &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const set &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
@@ -657,61 +657,61 @@ class multiset_impl
|
||||
~multiset_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(iterator)
|
||||
static multiset_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static multiset_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::container_from_end_iterator(const_iterator)
|
||||
static const multiset_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const multiset_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::container_from_iterator(iterator)
|
||||
static multiset_impl &container_from_iterator(iterator it);
|
||||
static multiset_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::container_from_iterator(const_iterator)
|
||||
static const multiset_impl &container_from_iterator(const_iterator it);
|
||||
static const multiset_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -720,10 +720,10 @@ class multiset_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::swap
|
||||
void swap(multiset_impl& other);
|
||||
@@ -758,19 +758,19 @@ class multiset_impl
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::rbtree::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value);
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::push_back
|
||||
void push_back(reference value);
|
||||
void push_back(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::push_front
|
||||
void push_front(reference value);
|
||||
void push_front(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::erase(const_iterator)
|
||||
iterator erase(const_iterator i);
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e);
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::erase(const key_type &)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -781,11 +781,11 @@ class multiset_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::erase_and_dispose(const key_type &, Disposer)
|
||||
template<class Disposer>
|
||||
@@ -796,11 +796,11 @@ class multiset_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::count(const key_type &)const
|
||||
size_type count(const key_type &key) const;
|
||||
@@ -886,28 +886,28 @@ class multiset_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::merge_equal
|
||||
template<class ...Options2>
|
||||
@@ -1050,16 +1050,16 @@ class multiset
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(multiset) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static multiset &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static multiset &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<multiset &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const multiset &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const multiset &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const multiset &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static multiset &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static multiset &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<multiset &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const multiset &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const multiset &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const multiset &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ class set_base_hook
|
||||
//! initializes the node to an unlinked state.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
set_base_hook();
|
||||
set_base_hook() BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
|
||||
//! initializes the node to an unlinked state. The argument is ignored.
|
||||
@@ -110,7 +110,7 @@ class set_base_hook
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
set_base_hook(const set_base_hook& );
|
||||
set_base_hook(const set_base_hook& ) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Empty function. The argument is ignored.
|
||||
//!
|
||||
@@ -120,7 +120,7 @@ class set_base_hook
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
set_base_hook& operator=(const set_base_hook& );
|
||||
set_base_hook& operator=(const set_base_hook& ) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c normal_link, the destructor does
|
||||
//! nothing (ie. no code is generated). If link_mode is \c safe_link and the
|
||||
@@ -142,7 +142,7 @@ class set_base_hook
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void swap_nodes(set_base_hook &other);
|
||||
void swap_nodes(set_base_hook &other) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Precondition</b>: link_mode must be \c safe_link or \c auto_unlink.
|
||||
//!
|
||||
@@ -151,13 +151,13 @@ class set_base_hook
|
||||
//! will return a valid iterator.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
bool is_linked() const;
|
||||
bool is_linked() const BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Removes the node if it's inserted in a container.
|
||||
//! This function is only allowed if link_mode is \c auto_unlink.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void unlink();
|
||||
void unlink() BOOST_NOEXCEPT;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -226,7 +226,7 @@ class set_member_hook
|
||||
//! initializes the node to an unlinked state.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
set_member_hook();
|
||||
set_member_hook() BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
|
||||
//! initializes the node to an unlinked state. The argument is ignored.
|
||||
@@ -237,7 +237,7 @@ class set_member_hook
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
set_member_hook(const set_member_hook& );
|
||||
set_member_hook(const set_member_hook& ) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Empty function. The argument is ignored.
|
||||
//!
|
||||
@@ -247,7 +247,7 @@ class set_member_hook
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
set_member_hook& operator=(const set_member_hook& );
|
||||
set_member_hook& operator=(const set_member_hook& ) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c normal_link, the destructor does
|
||||
//! nothing (ie. no code is generated). If link_mode is \c safe_link and the
|
||||
@@ -269,7 +269,7 @@ class set_member_hook
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void swap_nodes(set_member_hook &other);
|
||||
void swap_nodes(set_member_hook &other) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Precondition</b>: link_mode must be \c safe_link or \c auto_unlink.
|
||||
//!
|
||||
@@ -278,13 +278,13 @@ class set_member_hook
|
||||
//! will return a valid iterator.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
bool is_linked() const;
|
||||
bool is_linked() const BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Removes the node if it's inserted in a container.
|
||||
//! This function is only allowed if link_mode is \c auto_unlink.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void unlink();
|
||||
void unlink() BOOST_NOEXCEPT;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -118,61 +118,61 @@ class sg_set_impl
|
||||
~sg_set_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(iterator)
|
||||
static sg_set_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static sg_set_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(const_iterator)
|
||||
static const sg_set_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const sg_set_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::container_from_iterator(iterator)
|
||||
static sg_set_impl &container_from_iterator(iterator it);
|
||||
static sg_set_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::container_from_iterator(const_iterator)
|
||||
static const sg_set_impl &container_from_iterator(const_iterator it);
|
||||
static const sg_set_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -181,10 +181,10 @@ class sg_set_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::swap
|
||||
void swap(sg_set_impl& other);
|
||||
@@ -242,24 +242,24 @@ class sg_set_impl
|
||||
{ tree_type::insert_unique(b, e); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::insert_unique_commit
|
||||
iterator insert_commit(reference value, const insert_commit_data &commit_data)
|
||||
iterator insert_commit(reference value, const insert_commit_data &commit_data) BOOST_NOEXCEPT
|
||||
{ return tree_type::insert_unique_commit(value, commit_data); }
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::sgtree::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value);
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::push_back
|
||||
void push_back(reference value);
|
||||
void push_back(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::push_front
|
||||
void push_front(reference value);
|
||||
void push_front(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::erase(const_iterator)
|
||||
iterator erase(const_iterator i);
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e);
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::erase(const key_type &)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -270,11 +270,11 @@ class sg_set_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const key_type &, Disposer)
|
||||
template<class Disposer>
|
||||
@@ -285,11 +285,11 @@ class sg_set_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
#endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
@@ -389,40 +389,40 @@ class sg_set_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::rebalance
|
||||
void rebalance();
|
||||
void rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::rebalance_subtree
|
||||
iterator rebalance_subtree(iterator root);
|
||||
iterator rebalance_subtree(iterator root) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::balance_factor()
|
||||
float balance_factor() const;
|
||||
float balance_factor() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::balance_factor(float)
|
||||
void balance_factor(float new_alpha);
|
||||
void balance_factor(float new_alpha) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::merge_unique
|
||||
template<class ...Options2>
|
||||
@@ -564,16 +564,16 @@ class sg_set
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(sg_set) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static sg_set &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static sg_set &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<sg_set &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const sg_set &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const sg_set &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const sg_set &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static sg_set &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static sg_set &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<sg_set &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const sg_set &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const sg_set &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const sg_set &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
@@ -666,61 +666,61 @@ class sg_multiset_impl
|
||||
~sg_multiset_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(iterator)
|
||||
static sg_multiset_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static sg_multiset_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(const_iterator)
|
||||
static const sg_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const sg_multiset_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::container_from_iterator(iterator)
|
||||
static sg_multiset_impl &container_from_iterator(iterator it);
|
||||
static sg_multiset_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::container_from_iterator(const_iterator)
|
||||
static const sg_multiset_impl &container_from_iterator(const_iterator it);
|
||||
static const sg_multiset_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -729,10 +729,10 @@ class sg_multiset_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::swap
|
||||
void swap(sg_multiset_impl& other);
|
||||
@@ -767,19 +767,19 @@ class sg_multiset_impl
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::sgtree::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value);
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::push_back
|
||||
void push_back(reference value);
|
||||
void push_back(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::push_front
|
||||
void push_front(reference value);
|
||||
void push_front(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::erase(const_iterator)
|
||||
iterator erase(const_iterator i);
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e);
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::erase(const key_type &)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -790,11 +790,11 @@ class sg_multiset_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const key_type &, Disposer)
|
||||
template<class Disposer>
|
||||
@@ -805,11 +805,11 @@ class sg_multiset_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::count(const key_type &)const
|
||||
size_type count(const key_type &key) const;
|
||||
@@ -895,40 +895,40 @@ class sg_multiset_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::rebalance
|
||||
void rebalance();
|
||||
void rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::rebalance_subtree
|
||||
iterator rebalance_subtree(iterator root);
|
||||
iterator rebalance_subtree(iterator root) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::balance_factor()
|
||||
float balance_factor() const;
|
||||
float balance_factor() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::balance_factor(float)
|
||||
void balance_factor(float new_alpha);
|
||||
void balance_factor(float new_alpha) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::merge_unique
|
||||
template<class ...Options2>
|
||||
@@ -1071,16 +1071,16 @@ class sg_multiset
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(sg_multiset) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static sg_multiset &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static sg_multiset &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<sg_multiset &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const sg_multiset &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const sg_multiset &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const sg_multiset &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static sg_multiset &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static sg_multiset &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<sg_multiset &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const sg_multiset &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const sg_multiset &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const sg_multiset &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#include <cstddef>
|
||||
#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
|
||||
#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
@@ -347,61 +346,61 @@ class sgtree_impl
|
||||
~sgtree_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
|
||||
static sgtree_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static sgtree_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
|
||||
static const sgtree_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const sgtree_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
|
||||
static sgtree_impl &container_from_iterator(iterator it);
|
||||
static sgtree_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
|
||||
static const sgtree_impl &container_from_iterator(const_iterator it);
|
||||
static const sgtree_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -410,10 +409,10 @@ class sgtree_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
@@ -447,8 +446,7 @@ class sgtree_impl
|
||||
iterator insert_equal(reference value)
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
|
||||
node_ptr p = node_algorithms::insert_equal_upper_bound
|
||||
(this->tree_type::header_ptr(), to_insert, this->key_node_comp(this->key_comp())
|
||||
@@ -462,8 +460,7 @@ class sgtree_impl
|
||||
iterator insert_equal(const_iterator hint, reference value)
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
|
||||
node_ptr p = node_algorithms::insert_equal
|
||||
( this->tree_type::header_ptr(), hint.pointed_node(), to_insert, this->key_node_comp(this->key_comp())
|
||||
@@ -542,11 +539,10 @@ class sgtree_impl
|
||||
{ return this->insert_unique_check(hint, key, this->key_comp(), commit_data); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::insert_unique_commit
|
||||
iterator insert_unique_commit(reference value, const insert_commit_data &commit_data)
|
||||
iterator insert_unique_commit(reference value, const insert_commit_data &commit_data) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
|
||||
node_algorithms::insert_unique_commit
|
||||
( this->tree_type::header_ptr(), to_insert, commit_data
|
||||
@@ -572,11 +568,10 @@ class sgtree_impl
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value)
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
|
||||
node_ptr p = node_algorithms::insert_before
|
||||
( this->tree_type::header_ptr(), pos.pointed_node(), to_insert
|
||||
@@ -587,11 +582,10 @@ class sgtree_impl
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::push_back
|
||||
void push_back(reference value)
|
||||
void push_back(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
|
||||
node_algorithms::push_back
|
||||
( this->tree_type::header_ptr(), to_insert
|
||||
@@ -601,11 +595,10 @@ class sgtree_impl
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::push_front
|
||||
void push_front(reference value)
|
||||
void push_front(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
std::size_t max_tree_size = (std::size_t)this->max_tree_size_;
|
||||
node_algorithms::push_front
|
||||
( this->tree_type::header_ptr(), to_insert
|
||||
@@ -616,26 +609,25 @@ class sgtree_impl
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
|
||||
iterator erase(const_iterator i)
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT
|
||||
{
|
||||
const_iterator ret(i);
|
||||
++ret;
|
||||
node_ptr to_erase(i.pointed_node());
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!node_algorithms::unique(to_erase));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(to_erase));
|
||||
std::size_t max_tree_size = this->max_tree_size_;
|
||||
node_algorithms::erase
|
||||
( this->tree_type::header_ptr(), to_erase, (std::size_t)this->size()
|
||||
, max_tree_size, this->get_alpha_by_max_size_func());
|
||||
this->max_tree_size_ = (size_type)max_tree_size;
|
||||
this->tree_type::sz_traits().decrement();
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink)
|
||||
node_algorithms::init(to_erase);
|
||||
return ret.unconst();
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e)
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT
|
||||
{ size_type n; return private_erase(b, e, n); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
|
||||
@@ -656,7 +648,7 @@ class sgtree_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer)
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_erase(i.pointed_node());
|
||||
iterator ret(this->erase(i));
|
||||
@@ -666,13 +658,13 @@ class sgtree_impl
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(iterator i, Disposer disposer)
|
||||
iterator erase_and_dispose(iterator i, Disposer disposer) BOOST_NOEXCEPT
|
||||
{ return this->erase_and_dispose(const_iterator(i), disposer); }
|
||||
#endif
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT
|
||||
{ size_type n; return private_erase(b, e, n, disposer); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
|
||||
@@ -698,7 +690,7 @@ class sgtree_impl
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::clear
|
||||
void clear()
|
||||
void clear() BOOST_NOEXCEPT
|
||||
{
|
||||
tree_type::clear();
|
||||
this->max_tree_size_ = 0;
|
||||
@@ -706,7 +698,7 @@ class sgtree_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer)
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
tree_type::clear_and_dispose(disposer);
|
||||
this->max_tree_size_ = 0;
|
||||
@@ -857,34 +849,34 @@ class sgtree_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rebalance
|
||||
void rebalance();
|
||||
void rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rebalance_subtree
|
||||
iterator rebalance_subtree(iterator root);
|
||||
iterator rebalance_subtree(iterator root) BOOST_NOEXCEPT;
|
||||
|
||||
friend bool operator< (const sgtree_impl &x, const sgtree_impl &y);
|
||||
|
||||
@@ -907,7 +899,7 @@ class sgtree_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
float balance_factor() const
|
||||
float balance_factor() const BOOST_NOEXCEPT
|
||||
{ return this->get_alpha_traits().get_alpha(); }
|
||||
|
||||
//! <b>Requires</b>: new_alpha must be a value between 0.5 and 1.0
|
||||
@@ -918,7 +910,7 @@ class sgtree_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to the elements in the subtree.
|
||||
void balance_factor(float new_alpha)
|
||||
void balance_factor(float new_alpha) BOOST_NOEXCEPT
|
||||
{
|
||||
//The alpha factor CAN't be changed if the fixed, floating operation-less
|
||||
//1/sqrt(2) alpha factor option is activated
|
||||
@@ -937,14 +929,14 @@ class sgtree_impl
|
||||
/// @cond
|
||||
private:
|
||||
template<class Disposer>
|
||||
iterator private_erase(const_iterator b, const_iterator e, size_type &n, Disposer disposer)
|
||||
iterator private_erase(const_iterator b, const_iterator e, size_type &n, Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
for(n = 0; b != e; ++n)
|
||||
this->erase_and_dispose(b++, disposer);
|
||||
return b.unconst();
|
||||
}
|
||||
|
||||
iterator private_erase(const_iterator b, const_iterator e, size_type &n)
|
||||
iterator private_erase(const_iterator b, const_iterator e, size_type &n) BOOST_NOEXCEPT
|
||||
{
|
||||
for(n = 0; b != e; ++n)
|
||||
this->erase(b++);
|
||||
@@ -1058,16 +1050,16 @@ class sgtree
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(sgtree) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static sgtree &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static sgtree &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<sgtree &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const sgtree &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const sgtree &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const sgtree &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static sgtree &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static sgtree &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<sgtree &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const sgtree &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const sgtree &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const sgtree &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -85,53 +85,53 @@ class sgtree_algorithms
|
||||
};
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
|
||||
static node_ptr get_header(const_node_ptr n);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const_node_ptr)
|
||||
static node_ptr get_header(const_node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
|
||||
static node_ptr begin_node(const_node_ptr header);
|
||||
static node_ptr begin_node(const_node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::end_node
|
||||
static node_ptr end_node(const_node_ptr header);
|
||||
static node_ptr end_node(const_node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
|
||||
static void swap_tree(node_ptr header1, node_ptr header2);
|
||||
static void swap_tree(node_ptr header1, node_ptr header2) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr)
|
||||
static void swap_nodes(node_ptr node1, node_ptr node2);
|
||||
static void swap_nodes(node_ptr node1, node_ptr node2) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr,node_ptr,node_ptr)
|
||||
static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2);
|
||||
static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr)
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node);
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr,node_ptr)
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node);
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node) BOOST_NOEXCEPT;
|
||||
|
||||
//Unlink is not possible since tree metadata is needed to update the tree
|
||||
//!static void unlink(node_ptr node);
|
||||
//!static void unlink(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
|
||||
static node_ptr unlink_leftmost_without_rebalance(node_ptr header);
|
||||
static node_ptr unlink_leftmost_without_rebalance(node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
|
||||
static bool unique(const_node_ptr node);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const_node_ptr)
|
||||
static bool unique(const_node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
|
||||
static std::size_t size(const_node_ptr header);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::size(const_node_ptr)
|
||||
static std::size_t size(const_node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
|
||||
static node_ptr next_node(node_ptr node);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::next_node(node_ptr)
|
||||
static node_ptr next_node(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
|
||||
static node_ptr prev_node(node_ptr node);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(node_ptr)
|
||||
static node_ptr prev_node(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::init(node_ptr)
|
||||
static void init(node_ptr node);
|
||||
static void init(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::init_header(node_ptr)
|
||||
static void init_header(node_ptr header);
|
||||
static void init_header(node_ptr header) BOOST_NOEXCEPT;
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::erase(node_ptr,node_ptr)
|
||||
@@ -141,7 +141,7 @@ class sgtree_algorithms
|
||||
bstree_algo::erase(header, z);
|
||||
--tree_size;
|
||||
if (tree_size > 0 &&
|
||||
tree_size < alpha_by_maxsize(max_tree_size)){
|
||||
tree_size < static_cast<std::size_t>(alpha_by_maxsize(max_tree_size))){
|
||||
bstree_algo::rebalance(header);
|
||||
max_tree_size = tree_size;
|
||||
}
|
||||
@@ -149,42 +149,42 @@ class sgtree_algorithms
|
||||
}
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,node_ptr,Cloner,Disposer)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clone(const_node_ptr,node_ptr,Cloner,Disposer)
|
||||
template <class Cloner, class Disposer>
|
||||
static void clone
|
||||
(const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(node_ptr,Disposer)
|
||||
template<class Disposer>
|
||||
static void clear_and_dispose(node_ptr header, Disposer disposer);
|
||||
static void clear_and_dispose(node_ptr header, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr lower_bound
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr upper_bound
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::find(const_node_ptr, const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr find
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> equal_range
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const_node_ptr,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> bounded_range
|
||||
(const_node_ptr header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
|
||||
, bool left_closed, bool right_closed);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::count(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::size_t count(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
@@ -241,7 +241,7 @@ class sgtree_algorithms
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::push_back(node_ptr,node_ptr)
|
||||
template<class H_Alpha>
|
||||
static void push_back(node_ptr header, node_ptr new_node
|
||||
,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
|
||||
,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size) BOOST_NOEXCEPT
|
||||
{
|
||||
std::size_t depth;
|
||||
bstree_algo::push_back(header, new_node, &depth);
|
||||
@@ -251,14 +251,14 @@ class sgtree_algorithms
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::push_front(node_ptr,node_ptr)
|
||||
template<class H_Alpha>
|
||||
static void push_front(node_ptr header, node_ptr new_node
|
||||
,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
|
||||
,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size) BOOST_NOEXCEPT
|
||||
{
|
||||
std::size_t depth;
|
||||
bstree_algo::push_front(header, new_node, &depth);
|
||||
rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size);
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const_node_ptr,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, bool> insert_unique_check
|
||||
(const_node_ptr header, const KeyType &key
|
||||
@@ -271,7 +271,7 @@ class sgtree_algorithms
|
||||
return ret;
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const_node_ptr,node_ptr,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, bool> insert_unique_check
|
||||
(const_node_ptr header, node_ptr hint, const KeyType &key
|
||||
@@ -323,13 +323,13 @@ class sgtree_algorithms
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::is_header
|
||||
static bool is_header(const_node_ptr p);
|
||||
static bool is_header(const_node_ptr p) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::is_header
|
||||
static void rebalance(node_ptr header);
|
||||
static void rebalance(node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::rebalance_subtree
|
||||
static node_ptr rebalance_subtree(node_ptr old_root)
|
||||
static node_ptr rebalance_subtree(node_ptr old_root) BOOST_NOEXCEPT
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
/// @cond
|
||||
@@ -348,7 +348,7 @@ class sgtree_algorithms
|
||||
template<class H_Alpha>
|
||||
static void insert_commit
|
||||
(node_ptr header, node_ptr new_value, const insert_commit_data &commit_data
|
||||
,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
|
||||
,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::insert_unique_commit(header, new_value, commit_data);
|
||||
rebalance_after_insertion(new_value, commit_data.depth, tree_size+1, h_alpha, max_tree_size);
|
||||
@@ -357,7 +357,7 @@ class sgtree_algorithms
|
||||
template<class H_Alpha>
|
||||
static void rebalance_after_insertion
|
||||
(node_ptr x, std::size_t depth
|
||||
, std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
|
||||
, std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size) BOOST_NOEXCEPT
|
||||
{
|
||||
if(tree_size > max_tree_size)
|
||||
max_tree_size = tree_size;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -97,7 +97,7 @@ class slist_base_hook
|
||||
//! initializes the node to an unlinked state.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
slist_base_hook();
|
||||
slist_base_hook() BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
|
||||
//! initializes the node to an unlinked state. The argument is ignored.
|
||||
@@ -108,7 +108,7 @@ class slist_base_hook
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
slist_base_hook(const slist_base_hook& );
|
||||
slist_base_hook(const slist_base_hook& ) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Empty function. The argument is ignored.
|
||||
//!
|
||||
@@ -118,7 +118,7 @@ class slist_base_hook
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
slist_base_hook& operator=(const slist_base_hook& );
|
||||
slist_base_hook& operator=(const slist_base_hook& ) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c normal_link, the destructor does
|
||||
//! nothing (ie. no code is generated). If link_mode is \c safe_link and the
|
||||
@@ -140,7 +140,7 @@ class slist_base_hook
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void swap_nodes(slist_base_hook &other);
|
||||
void swap_nodes(slist_base_hook &other) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Precondition</b>: link_mode must be \c safe_link or \c auto_unlink.
|
||||
//!
|
||||
@@ -148,14 +148,16 @@ class slist_base_hook
|
||||
//! otherwise. This function can be used to test whether \c slist::iterator_to
|
||||
//! will return a valid iterator.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
bool is_linked() const;
|
||||
bool is_linked() const BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Removes the node if it's inserted in a container.
|
||||
//! This function is only allowed if link_mode is \c auto_unlink.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void unlink();
|
||||
void unlink() BOOST_NOEXCEPT;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -118,61 +118,61 @@ class splay_set_impl
|
||||
~splay_set_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(iterator)
|
||||
static splay_set_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static splay_set_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(const_iterator)
|
||||
static const splay_set_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const splay_set_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::container_from_iterator(iterator)
|
||||
static splay_set_impl &container_from_iterator(iterator it);
|
||||
static splay_set_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::container_from_iterator(const_iterator)
|
||||
static const splay_set_impl &container_from_iterator(const_iterator it);
|
||||
static const splay_set_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -181,10 +181,10 @@ class splay_set_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::swap
|
||||
void swap(splay_set_impl& other);
|
||||
@@ -242,24 +242,24 @@ class splay_set_impl
|
||||
{ tree_type::insert_unique(b, e); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::insert_unique_commit
|
||||
iterator insert_commit(reference value, const insert_commit_data &commit_data)
|
||||
iterator insert_commit(reference value, const insert_commit_data &commit_data) BOOST_NOEXCEPT
|
||||
{ return tree_type::insert_unique_commit(value, commit_data); }
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::splaytree::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value);
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::push_back
|
||||
void push_back(reference value);
|
||||
void push_back(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::push_front
|
||||
void push_front(reference value);
|
||||
void push_front(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::erase(const_iterator)
|
||||
iterator erase(const_iterator i);
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e);
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::erase(const key_type &)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -270,11 +270,11 @@ class splay_set_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const key_type &, Disposer)
|
||||
template<class Disposer>
|
||||
@@ -285,11 +285,11 @@ class splay_set_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
#endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
@@ -396,31 +396,31 @@ class splay_set_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::splay_up(iterator)
|
||||
void splay_up(iterator i);
|
||||
void splay_up(iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::splay_down(const KeyType&,KeyTypeKeyCompare)
|
||||
template<class KeyType, class KeyTypeKeyCompare>
|
||||
@@ -430,10 +430,10 @@ class splay_set_impl
|
||||
iterator splay_down(const key_type &key);
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::rebalance
|
||||
void rebalance();
|
||||
void rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::rebalance_subtree
|
||||
iterator rebalance_subtree(iterator root);
|
||||
iterator rebalance_subtree(iterator root) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::merge_unique
|
||||
template<class ...Options2>
|
||||
@@ -576,16 +576,16 @@ class splay_set
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(splay_set) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static splay_set &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static splay_set &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<splay_set &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const splay_set &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const splay_set &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const splay_set &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static splay_set &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static splay_set &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<splay_set &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const splay_set &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const splay_set &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const splay_set &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
@@ -678,61 +678,61 @@ class splay_multiset_impl
|
||||
~splay_multiset_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(iterator)
|
||||
static splay_multiset_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static splay_multiset_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(const_iterator)
|
||||
static const splay_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const splay_multiset_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::container_from_iterator(iterator)
|
||||
static splay_multiset_impl &container_from_iterator(iterator it);
|
||||
static splay_multiset_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::container_from_iterator(const_iterator)
|
||||
static const splay_multiset_impl &container_from_iterator(const_iterator it);
|
||||
static const splay_multiset_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -741,10 +741,10 @@ class splay_multiset_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::swap
|
||||
void swap(splay_multiset_impl& other);
|
||||
@@ -779,19 +779,19 @@ class splay_multiset_impl
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::splaytree::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value);
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::push_back
|
||||
void push_back(reference value);
|
||||
void push_back(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::push_front
|
||||
void push_front(reference value);
|
||||
void push_front(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::erase(const_iterator)
|
||||
iterator erase(const_iterator i);
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e);
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::erase(const key_type&)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -802,11 +802,11 @@ class splay_multiset_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const key_type&, Disposer)
|
||||
template<class Disposer>
|
||||
@@ -817,11 +817,11 @@ class splay_multiset_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::count(const key_type&)
|
||||
size_type count(const key_type&);
|
||||
@@ -907,31 +907,31 @@ class splay_multiset_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::splay_up(iterator)
|
||||
void splay_up(iterator i);
|
||||
void splay_up(iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::splay_down(const KeyType&,KeyTypeKeyCompare)
|
||||
template<class KeyType, class KeyTypeKeyCompare>
|
||||
@@ -941,10 +941,10 @@ class splay_multiset_impl
|
||||
iterator splay_down(const key_type &key);
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::rebalance
|
||||
void rebalance();
|
||||
void rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::rebalance_subtree
|
||||
iterator rebalance_subtree(iterator root);
|
||||
iterator rebalance_subtree(iterator root) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::merge_equal
|
||||
template<class ...Options2>
|
||||
@@ -1087,16 +1087,16 @@ class splay_multiset
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(splay_multiset) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static splay_multiset &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static splay_multiset &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<splay_multiset &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const splay_multiset &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const splay_multiset &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const splay_multiset &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static splay_multiset &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static splay_multiset &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<splay_multiset &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const splay_multiset &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const splay_multiset &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const splay_multiset &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -148,61 +148,61 @@ class splaytree_impl
|
||||
~splaytree_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
|
||||
static splaytree_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static splaytree_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
|
||||
static const splaytree_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const splaytree_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
|
||||
static splaytree_impl &container_from_iterator(iterator it);
|
||||
static splaytree_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
|
||||
static const splaytree_impl &container_from_iterator(const_iterator it);
|
||||
static const splaytree_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -211,10 +211,10 @@ class splaytree_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::swap
|
||||
void swap(splaytree_impl& other);
|
||||
@@ -273,26 +273,26 @@ class splaytree_impl
|
||||
,KeyTypeKeyCompare comp, insert_commit_data &commit_data);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::insert_unique_commit
|
||||
iterator insert_unique_commit(reference value, const insert_commit_data &commit_data);
|
||||
iterator insert_unique_commit(reference value, const insert_commit_data &commit_data) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::insert_unique(Iterator,Iterator)
|
||||
template<class Iterator>
|
||||
void insert_unique(Iterator b, Iterator e);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value);
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::push_back
|
||||
void push_back(reference value);
|
||||
void push_back(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::push_front
|
||||
void push_front(reference value);
|
||||
void push_front(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
|
||||
iterator erase(const_iterator i);
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e);
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -303,11 +303,11 @@ class splaytree_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
|
||||
template<class Disposer>
|
||||
@@ -318,11 +318,11 @@ class splaytree_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
|
||||
//! Additional note: non-const function, splaying is performed.
|
||||
@@ -440,28 +440,28 @@ class splaytree_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::merge_unique(bstree<T, Options2...>&)
|
||||
template<class T, class ...Options2>
|
||||
@@ -481,7 +481,7 @@ class splaytree_impl
|
||||
//! <b>Complexity</b>: Amortized logarithmic.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void splay_up(iterator i)
|
||||
void splay_up(iterator i) BOOST_NOEXCEPT
|
||||
{ return node_algorithms::splay_up(i.pointed_node(), tree_type::header_ptr()); }
|
||||
|
||||
//! <b>Effects</b>: Rearranges the container so that if *this stores an element
|
||||
@@ -517,10 +517,10 @@ class splaytree_impl
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree::rebalance
|
||||
void rebalance();
|
||||
void rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rebalance_subtree
|
||||
iterator rebalance_subtree(iterator root);
|
||||
iterator rebalance_subtree(iterator root) BOOST_NOEXCEPT;
|
||||
|
||||
friend bool operator< (const splaytree_impl &x, const splaytree_impl &y);
|
||||
|
||||
@@ -643,16 +643,16 @@ class splaytree
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(splaytree) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static splaytree &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static splaytree &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<splaytree &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const splaytree &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const splaytree &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const splaytree &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static splaytree &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static splaytree &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<splaytree &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const splaytree &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const splaytree &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const splaytree &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ struct splaydown_assemble_and_fix_header
|
||||
{
|
||||
typedef typename NodeTraits::node_ptr node_ptr;
|
||||
|
||||
splaydown_assemble_and_fix_header(node_ptr t, node_ptr header, node_ptr leftmost, node_ptr rightmost)
|
||||
splaydown_assemble_and_fix_header(node_ptr t, node_ptr header, node_ptr leftmost, node_ptr rightmost) BOOST_NOEXCEPT
|
||||
: t_(t)
|
||||
, null_node_(header)
|
||||
, l_(null_node_)
|
||||
@@ -79,7 +79,7 @@ struct splaydown_assemble_and_fix_header
|
||||
|
||||
private:
|
||||
|
||||
void assemble()
|
||||
void assemble() BOOST_NOEXCEPT
|
||||
{
|
||||
//procedure assemble;
|
||||
// left(r), right(l) := right(t), left(t);
|
||||
@@ -175,59 +175,59 @@ class splaytree_algorithms
|
||||
|
||||
public:
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
|
||||
static node_ptr get_header(const const_node_ptr & n);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const_node_ptr)
|
||||
static node_ptr get_header(const_node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
|
||||
static node_ptr begin_node(const const_node_ptr & header);
|
||||
static node_ptr begin_node(const_node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::end_node
|
||||
static node_ptr end_node(const const_node_ptr & header);
|
||||
static node_ptr end_node(const_node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
|
||||
static void swap_tree(const node_ptr & header1, const node_ptr & header2);
|
||||
static void swap_tree(node_ptr header1, node_ptr header2);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr)
|
||||
static void swap_nodes(node_ptr node1, node_ptr node2);
|
||||
static void swap_nodes(node_ptr node1, node_ptr node2) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr,node_ptr,node_ptr)
|
||||
static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2);
|
||||
static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr)
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node);
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr,node_ptr)
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node);
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unlink(node_ptr)
|
||||
static void unlink(node_ptr node);
|
||||
static void unlink(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
|
||||
static node_ptr unlink_leftmost_without_rebalance(node_ptr header);
|
||||
static node_ptr unlink_leftmost_without_rebalance(node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
|
||||
static bool unique(const_node_ptr node);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const_node_ptr)
|
||||
static bool unique(const_node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
|
||||
static std::size_t size(const_node_ptr header);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::size(const_node_ptr)
|
||||
static std::size_t size(const_node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
|
||||
static node_ptr next_node(node_ptr node);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::next_node(node_ptr)
|
||||
static node_ptr next_node(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
|
||||
static node_ptr prev_node(node_ptr node);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(node_ptr)
|
||||
static node_ptr prev_node(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::init(node_ptr)
|
||||
static void init(node_ptr node);
|
||||
static void init(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::init_header(node_ptr)
|
||||
static void init_header(node_ptr header);
|
||||
static void init_header(node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::erase(node_ptr,node_ptr)
|
||||
//! Additional notes: the previous node of z is splayed to speed up range deletions.
|
||||
static void erase(node_ptr header, node_ptr z)
|
||||
static void erase(node_ptr header, node_ptr z) BOOST_NOEXCEPT
|
||||
{
|
||||
//posibility 1
|
||||
if(NodeTraits::get_left(z)){
|
||||
@@ -279,17 +279,17 @@ class splaytree_algorithms
|
||||
}
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,node_ptr,Cloner,Disposer)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clone(const_node_ptr,node_ptr,Cloner,Disposer)
|
||||
template <class Cloner, class Disposer>
|
||||
static void clone
|
||||
(const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(node_ptr,Disposer)
|
||||
template<class Disposer>
|
||||
static void clear_and_dispose(node_ptr header, Disposer disposer);
|
||||
static void clear_and_dispose(node_ptr header, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::count(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
//! Additional notes: an element with key `key` is splayed.
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::size_t count
|
||||
@@ -304,14 +304,14 @@ class splaytree_algorithms
|
||||
return n;
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::count(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
//! Additional note: no splaying is performed
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::size_t count
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
{ return bstree_algo::count(header, key, comp); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
//! Additional notes: the first node of the range is splayed.
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr lower_bound
|
||||
@@ -323,14 +323,14 @@ class splaytree_algorithms
|
||||
return y;
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
//! Additional note: no splaying is performed
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr lower_bound
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
{ return bstree_algo::lower_bound(header, key, comp); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
//! Additional notes: the first node of the range is splayed.
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr upper_bound
|
||||
@@ -342,14 +342,14 @@ class splaytree_algorithms
|
||||
return y;
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
//! Additional note: no splaying is performed
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr upper_bound
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
{ return bstree_algo::upper_bound(header, key, comp); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::find(const_node_ptr, const KeyType&,KeyNodePtrCompare)
|
||||
//! Additional notes: the found node of the lower bound is splayed.
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr find
|
||||
@@ -359,14 +359,14 @@ class splaytree_algorithms
|
||||
return bstree_algo::find(header, key, comp);
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::find(const_node_ptr, const KeyType&,KeyNodePtrCompare)
|
||||
//! Additional note: no splaying is performed
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr find
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
{ return bstree_algo::find(header, key, comp); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
//! Additional notes: the first node of the range is splayed.
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> equal_range
|
||||
@@ -378,14 +378,14 @@ class splaytree_algorithms
|
||||
return ret;
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
//! Additional note: no splaying is performed
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> equal_range
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
{ return bstree_algo::equal_range(header, key, comp); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound_range(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
//! Additional notes: the first node of the range is splayed.
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> lower_bound_range
|
||||
@@ -397,14 +397,14 @@ class splaytree_algorithms
|
||||
return ret;
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound_range(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
//! Additional note: no splaying is performed
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> lower_bound_range
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
|
||||
{ return bstree_algo::lower_bound_range(header, key, comp); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const_node_ptr,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
|
||||
//! Additional notes: the first node of the range is splayed.
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> bounded_range
|
||||
@@ -418,7 +418,7 @@ class splaytree_algorithms
|
||||
return ret;
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const_node_ptr,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
|
||||
//! Additional note: no splaying is performed
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> bounded_range
|
||||
@@ -459,7 +459,7 @@ class splaytree_algorithms
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_before(node_ptr,node_ptr,node_ptr)
|
||||
//! Additional note: the inserted node is splayed
|
||||
static node_ptr insert_before
|
||||
(node_ptr header, node_ptr pos, node_ptr new_node)
|
||||
(node_ptr header, node_ptr pos, node_ptr new_node) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::insert_before(header, pos, new_node);
|
||||
splay_up(new_node, header);
|
||||
@@ -468,7 +468,7 @@ class splaytree_algorithms
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::push_back(node_ptr,node_ptr)
|
||||
//! Additional note: the inserted node is splayed
|
||||
static void push_back(node_ptr header, node_ptr new_node)
|
||||
static void push_back(node_ptr header, node_ptr new_node) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::push_back(header, new_node);
|
||||
splay_up(new_node, header);
|
||||
@@ -476,13 +476,13 @@ class splaytree_algorithms
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::push_front(node_ptr,node_ptr)
|
||||
//! Additional note: the inserted node is splayed
|
||||
static void push_front(node_ptr header, node_ptr new_node)
|
||||
static void push_front(node_ptr header, node_ptr new_node) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::push_front(header, new_node);
|
||||
splay_up(new_node, header);
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const_node_ptr,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
//! Additional note: nodes with the given key are splayed
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, bool> insert_unique_check
|
||||
@@ -493,7 +493,7 @@ class splaytree_algorithms
|
||||
return bstree_algo::insert_unique_check(header, key, comp, commit_data);
|
||||
}
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const_node_ptr,node_ptr,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
|
||||
//! Additional note: nodes with the given key are splayed
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, bool> insert_unique_check
|
||||
@@ -507,22 +507,22 @@ class splaytree_algorithms
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_commit(node_ptr,node_ptr,const insert_commit_data&)
|
||||
static void insert_unique_commit
|
||||
(node_ptr header, node_ptr new_value, const insert_commit_data &commit_data);
|
||||
(node_ptr header, node_ptr new_value, const insert_commit_data &commit_data) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::is_header
|
||||
static bool is_header(const_node_ptr p);
|
||||
static bool is_header(const_node_ptr p) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::rebalance
|
||||
static void rebalance(node_ptr header);
|
||||
static void rebalance(node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::rebalance_subtree
|
||||
static node_ptr rebalance_subtree(node_ptr old_root);
|
||||
static node_ptr rebalance_subtree(node_ptr old_root) BOOST_NOEXCEPT;
|
||||
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
// bottom-up splay, use data_ as parent for n | complexity : logarithmic | exception : nothrow
|
||||
static void splay_up(node_ptr node, node_ptr header)
|
||||
{ priv_splay_up<true>(node, header); }
|
||||
static void splay_up(node_ptr n, node_ptr header) BOOST_NOEXCEPT
|
||||
{ priv_splay_up<true>(n, header); }
|
||||
|
||||
// top-down splay | complexity : logarithmic | exception : strong, note A
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
@@ -535,12 +535,14 @@ class splaytree_algorithms
|
||||
|
||||
// bottom-up splay, use data_ as parent for n | complexity : logarithmic | exception : nothrow
|
||||
template<bool SimpleSplay>
|
||||
static void priv_splay_up(node_ptr node, node_ptr header)
|
||||
static void priv_splay_up(node_ptr n, node_ptr header) BOOST_NOEXCEPT
|
||||
{
|
||||
// If (node == header) do a splay for the right most node instead
|
||||
// this is to boost performance of equal_range/count on equivalent containers in the case
|
||||
// where there are many equal elements at the end
|
||||
node_ptr n((node == header) ? NodeTraits::get_right(header) : node);
|
||||
if(n == header)
|
||||
n = NodeTraits::get_right(header);
|
||||
|
||||
node_ptr t(header);
|
||||
|
||||
if( n == t ) return;
|
||||
@@ -660,7 +662,7 @@ class splaytree_algorithms
|
||||
}
|
||||
|
||||
// break link to left child node and attach it to left tree pointed to by l | complexity : constant | exception : nothrow
|
||||
static void link_left(node_ptr & t, node_ptr & l)
|
||||
static void link_left(node_ptr & t, node_ptr & l) BOOST_NOEXCEPT
|
||||
{
|
||||
//procedure link_left;
|
||||
// t, l, right(l) := right(t), t, t
|
||||
@@ -672,7 +674,7 @@ class splaytree_algorithms
|
||||
}
|
||||
|
||||
// break link to right child node and attach it to right tree pointed to by r | complexity : constant | exception : nothrow
|
||||
static void link_right(node_ptr & t, node_ptr & r)
|
||||
static void link_right(node_ptr & t, node_ptr & r) BOOST_NOEXCEPT
|
||||
{
|
||||
//procedure link_right;
|
||||
// t, r, left(r) := left(t), t, t
|
||||
@@ -684,7 +686,7 @@ class splaytree_algorithms
|
||||
}
|
||||
|
||||
// rotate n with its parent | complexity : constant | exception : nothrow
|
||||
static void rotate(node_ptr n)
|
||||
static void rotate(node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
//procedure rotate_left;
|
||||
// t, right(t), left(right(t)) := right(t), left(right(t)), t
|
||||
|
||||
@@ -82,7 +82,7 @@ struct treap_tag;
|
||||
//! The container supports the following options:
|
||||
//! \c base_hook<>/member_hook<>/value_traits<>,
|
||||
//! \c constant_time_size<>, \c size_type<>,
|
||||
//! \c compare<> and \c priority_compare<>
|
||||
//! \c compare<>, \c priority<> and \c priority_of_value<>
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
template<class T, class ...Options>
|
||||
#else
|
||||
@@ -232,22 +232,22 @@ class treap_impl
|
||||
~treap_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
#endif
|
||||
|
||||
//! <b>Effects</b>: Returns an iterator pointing to the highest priority object of the treap.
|
||||
@@ -255,7 +255,7 @@ class treap_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
iterator top()
|
||||
BOOST_INTRUSIVE_FORCEINLINE iterator top() BOOST_NOEXCEPT
|
||||
{ return this->tree_type::root(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator pointing to the highest priority object of the treap..
|
||||
@@ -263,7 +263,7 @@ class treap_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
const_iterator top() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator top() const BOOST_NOEXCEPT
|
||||
{ return this->ctop(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_iterator pointing to the highest priority object of the treap..
|
||||
@@ -271,36 +271,36 @@ class treap_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
const_iterator ctop() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator ctop() const BOOST_NOEXCEPT
|
||||
{ return this->tree_type::root(); }
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -310,7 +310,7 @@ class treap_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
reverse_iterator rtop()
|
||||
BOOST_INTRUSIVE_FORCEINLINE reverse_iterator rtop() BOOST_NOEXCEPT
|
||||
{ return reverse_iterator(this->top()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the highest priority objec
|
||||
@@ -319,7 +319,7 @@ class treap_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
const_reverse_iterator rtop() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator rtop() const BOOST_NOEXCEPT
|
||||
{ return const_reverse_iterator(this->top()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the highest priority object
|
||||
@@ -328,21 +328,21 @@ class treap_impl
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
const_reverse_iterator crtop() const
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator crtop() const BOOST_NOEXCEPT
|
||||
{ return const_reverse_iterator(this->top()); }
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
|
||||
static treap_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static treap_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
|
||||
static const treap_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const treap_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
|
||||
static treap_impl &container_from_iterator(iterator it);
|
||||
static treap_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
|
||||
static const treap_impl &container_from_iterator(const_iterator it);
|
||||
static const treap_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -351,10 +351,10 @@ class treap_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! <b>Effects</b>: Returns the priority_compare object used by the container.
|
||||
@@ -755,7 +755,7 @@ class treap_impl
|
||||
//! <b>Notes</b>: This function has only sense if a "insert_check" has been
|
||||
//! previously executed to fill "commit_data". No value should be inserted or
|
||||
//! erased between the "insert_check" and "insert_commit" calls.
|
||||
iterator insert_unique_commit(reference value, const insert_commit_data &commit_data)
|
||||
iterator insert_unique_commit(reference value, const insert_commit_data &commit_data) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
@@ -778,7 +778,7 @@ class treap_impl
|
||||
//! the successor of "value" container ordering invariant will be broken.
|
||||
//! This is a low-level function to be used only for performance reasons
|
||||
//! by advanced users.
|
||||
iterator insert_before(const_iterator pos, reference value)
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
@@ -808,7 +808,7 @@ class treap_impl
|
||||
//! This function is slightly more efficient than using "insert_before".
|
||||
//! This is a low-level function to be used only for performance reasons
|
||||
//! by advanced users.
|
||||
void push_back(reference value)
|
||||
void push_back(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
@@ -831,7 +831,7 @@ class treap_impl
|
||||
//! This function is slightly more efficient than using "insert_before".
|
||||
//! This is a low-level function to be used only for performance reasons
|
||||
//! by advanced users.
|
||||
void push_front(reference value)
|
||||
void push_front(reference value) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
|
||||
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
|
||||
@@ -848,7 +848,7 @@ class treap_impl
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references)
|
||||
//! to the erased elements. No destructors are called.
|
||||
iterator erase(const_iterator i)
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT
|
||||
{
|
||||
const_iterator ret(i);
|
||||
++ret;
|
||||
@@ -857,7 +857,7 @@ class treap_impl
|
||||
node_algorithms::erase
|
||||
(this->tree_type::header_ptr(), to_erase, this->prio_node_prio_comp(this->priv_pcomp()));
|
||||
this->tree_type::sz_traits().decrement();
|
||||
if(safemode_or_autounlink)
|
||||
BOOST_IF_CONSTEXPR(safemode_or_autounlink)
|
||||
node_algorithms::init(to_erase);
|
||||
return ret.unconst();
|
||||
}
|
||||
@@ -871,7 +871,7 @@ class treap_impl
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references)
|
||||
//! to the erased elements. No destructors are called.
|
||||
iterator erase(const_iterator b, const_iterator e)
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT
|
||||
{ size_type n; return private_erase(b, e, n); }
|
||||
|
||||
//! <b>Effects</b>: Erases all the elements with the given value.
|
||||
@@ -922,7 +922,7 @@ class treap_impl
|
||||
//! <b>Note</b>: Invalidates the iterators
|
||||
//! to the erased elements.
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer)
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
node_ptr to_erase(i.pointed_node());
|
||||
iterator ret(this->erase(i));
|
||||
@@ -932,7 +932,7 @@ class treap_impl
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(iterator i, Disposer disposer)
|
||||
iterator erase_and_dispose(iterator i, Disposer disposer) BOOST_NOEXCEPT
|
||||
{ return this->erase_and_dispose(const_iterator(i), disposer); }
|
||||
#endif
|
||||
|
||||
@@ -949,7 +949,7 @@ class treap_impl
|
||||
//! <b>Note</b>: Invalidates the iterators
|
||||
//! to the erased elements.
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT
|
||||
{ size_type n; return private_erase(b, e, n, disposer); }
|
||||
|
||||
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
|
||||
@@ -1010,7 +1010,7 @@ class treap_impl
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references)
|
||||
//! to the erased elements. No destructors are called.
|
||||
void clear()
|
||||
void clear() BOOST_NOEXCEPT
|
||||
{ tree_type::clear(); }
|
||||
|
||||
//! <b>Effects</b>: Erases all of the elements calling disposer(p) for
|
||||
@@ -1023,7 +1023,7 @@ class treap_impl
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references)
|
||||
//! to the erased elements. Calls N times to disposer functor.
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer)
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT
|
||||
{
|
||||
node_algorithms::clear_and_dispose(this->tree_type::header_ptr()
|
||||
, detail::node_disposer<Disposer, value_traits, TreapAlgorithms>(disposer, &this->get_value_traits()));
|
||||
@@ -1180,28 +1180,28 @@ class treap_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
friend bool operator< (const treap_impl &x, const treap_impl &y);
|
||||
|
||||
@@ -1348,16 +1348,16 @@ class treap
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(treap) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static treap &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static treap &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<treap &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const treap &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const treap &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const treap &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static treap &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static treap &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<treap &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const treap &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const treap &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const treap &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -49,14 +49,12 @@ struct treap_node_extra_checker
|
||||
: base_checker_t(extra_checker), prio_comp_(prio_comp)
|
||||
{}
|
||||
|
||||
void operator () (const const_node_ptr& p,
|
||||
void operator () (const_node_ptr p,
|
||||
const return_type& check_return_left, const return_type& check_return_right,
|
||||
return_type& check_return)
|
||||
{
|
||||
if (node_traits::get_left(p))
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(!prio_comp_(node_traits::get_left(p), p));
|
||||
if (node_traits::get_right(p))
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(!prio_comp_(node_traits::get_right(p), p));
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_traits::get_left(p) || !prio_comp_(node_traits::get_left(p), p));
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_traits::get_right(p) || !prio_comp_(node_traits::get_right(p), p));
|
||||
base_checker_t::operator()(p, check_return_left, check_return_right, check_return);
|
||||
}
|
||||
|
||||
@@ -180,64 +178,64 @@ class treap_algorithms
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
|
||||
static node_ptr get_header(const_node_ptr n);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const_node_ptr)
|
||||
static node_ptr get_header(const_node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
|
||||
static node_ptr begin_node(const_node_ptr header);
|
||||
static node_ptr begin_node(const_node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::end_node
|
||||
static node_ptr end_node(const_node_ptr header);
|
||||
static node_ptr end_node(const_node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
|
||||
static void swap_tree(node_ptr header1, node_ptr header2);
|
||||
static void swap_tree(node_ptr header1, node_ptr header2) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr)
|
||||
static void swap_nodes(node_ptr node1, node_ptr node2);
|
||||
static void swap_nodes(node_ptr node1, node_ptr node2) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr,node_ptr,node_ptr)
|
||||
static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2);
|
||||
static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr)
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node);
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr,node_ptr)
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node);
|
||||
static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node) BOOST_NOEXCEPT;
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unlink(node_ptr)
|
||||
template<class NodePtrPriorityCompare>
|
||||
static void unlink(node_ptr node, NodePtrPriorityCompare pcomp)
|
||||
static void unlink(node_ptr n, NodePtrPriorityCompare pcomp)
|
||||
{
|
||||
node_ptr x = NodeTraits::get_parent(node);
|
||||
node_ptr x = NodeTraits::get_parent(n);
|
||||
if(x){
|
||||
while(!bstree_algo::is_header(x))
|
||||
x = NodeTraits::get_parent(x);
|
||||
erase(x, node, pcomp);
|
||||
erase(x, n, pcomp);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
|
||||
static node_ptr unlink_leftmost_without_rebalance(node_ptr header);
|
||||
static node_ptr unlink_leftmost_without_rebalance(node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
|
||||
static bool unique(const_node_ptr node);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const_node_ptr)
|
||||
static bool unique(const_node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
|
||||
static std::size_t size(const_node_ptr header);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::size(const_node_ptr)
|
||||
static std::size_t size(const_node_ptr header) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
|
||||
static node_ptr next_node(node_ptr node);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::next_node(node_ptr)
|
||||
static node_ptr next_node(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
|
||||
static node_ptr prev_node(node_ptr node);
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(node_ptr)
|
||||
static node_ptr prev_node(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::init(node_ptr)
|
||||
static void init(node_ptr node);
|
||||
static void init(node_ptr n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::init_header(node_ptr)
|
||||
static void init_header(node_ptr header);
|
||||
static void init_header(node_ptr header) BOOST_NOEXCEPT;
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::erase(node_ptr,node_ptr)
|
||||
@@ -250,42 +248,42 @@ class treap_algorithms
|
||||
}
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,node_ptr,Cloner,Disposer)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clone(const_node_ptr,node_ptr,Cloner,Disposer)
|
||||
template <class Cloner, class Disposer>
|
||||
static void clone
|
||||
(const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(node_ptr,Disposer)
|
||||
template<class Disposer>
|
||||
static void clear_and_dispose(node_ptr header, Disposer disposer);
|
||||
static void clear_and_dispose(node_ptr header, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr lower_bound
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr upper_bound
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::find(const_node_ptr, const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static node_ptr find
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> equal_range
|
||||
(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const_node_ptr,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::pair<node_ptr, node_ptr> bounded_range
|
||||
(const_node_ptr header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
|
||||
, bool left_closed, bool right_closed);
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::count(const_node_ptr,const KeyType&,KeyNodePtrCompare)
|
||||
template<class KeyType, class KeyNodePtrCompare>
|
||||
static std::size_t count(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
|
||||
|
||||
@@ -566,7 +564,7 @@ class treap_algorithms
|
||||
//! previously executed to fill "commit_data". No value should be inserted or
|
||||
//! erased between the "insert_check" and "insert_commit" calls.
|
||||
static void insert_unique_commit
|
||||
(node_ptr header, node_ptr new_node, const insert_commit_data &commit_data)
|
||||
(node_ptr header, node_ptr new_node, const insert_commit_data &commit_data) BOOST_NOEXCEPT
|
||||
{
|
||||
bstree_algo::insert_unique_commit(header, new_node, commit_data);
|
||||
rotate_up_n(header, new_node, commit_data.rotations);
|
||||
@@ -603,7 +601,7 @@ class treap_algorithms
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::is_header
|
||||
static bool is_header(const_node_ptr p);
|
||||
static bool is_header(const_node_ptr p) BOOST_NOEXCEPT;
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
/// @cond
|
||||
|
||||
@@ -41,7 +41,7 @@ class treap_multiset_impl;
|
||||
//! The container supports the following options:
|
||||
//! \c base_hook<>/member_hook<>/value_traits<>,
|
||||
//! \c constant_time_size<>, \c size_type<>,
|
||||
//! \c compare<> and \c priority_compare<>
|
||||
//! \c compare<>, \c priority<> and \c priority_of_value<>
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
template<class T, class ...Options>
|
||||
#else
|
||||
@@ -126,61 +126,61 @@ class treap_set_impl
|
||||
~treap_set_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::container_from_end_iterator(iterator)
|
||||
static treap_set_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static treap_set_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::container_from_end_iterator(const_iterator)
|
||||
static const treap_set_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const treap_set_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::container_from_iterator(iterator)
|
||||
static treap_set_impl &container_from_iterator(iterator it);
|
||||
static treap_set_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::container_from_iterator(const_iterator)
|
||||
static const treap_set_impl &container_from_iterator(const_iterator it);
|
||||
static const treap_set_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -189,10 +189,10 @@ class treap_set_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::swap
|
||||
void swap(treap_set_impl& other);
|
||||
@@ -215,22 +215,22 @@ class treap_set_impl
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::top()
|
||||
iterator top();
|
||||
BOOST_INTRUSIVE_FORCEINLINE iterator top() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::top()const
|
||||
const_iterator top() const;
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator top() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::ctop()const
|
||||
const_iterator ctop() const;
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator ctop() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::rtop()
|
||||
reverse_iterator rtop();
|
||||
BOOST_INTRUSIVE_FORCEINLINE reverse_iterator rtop() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::rtop()const
|
||||
const_reverse_iterator rtop() const;
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator rtop() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::crtop()const
|
||||
const_reverse_iterator crtop() const;
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator crtop() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::crtop() const
|
||||
priority_compare priority_comp() const;
|
||||
@@ -275,24 +275,24 @@ class treap_set_impl
|
||||
{ tree_type::insert_unique(b, e); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::insert_unique_commit
|
||||
iterator insert_commit(reference value, const insert_commit_data &commit_data)
|
||||
iterator insert_commit(reference value, const insert_commit_data &commit_data) BOOST_NOEXCEPT
|
||||
{ return tree_type::insert_unique_commit(value, commit_data); }
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::treap::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value);
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::push_back
|
||||
void push_back(reference value);
|
||||
void push_back(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::push_front
|
||||
void push_front(reference value);
|
||||
void push_front(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::erase(const_iterator)
|
||||
iterator erase(const_iterator i);
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e);
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::erase(const key_type &)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -303,11 +303,11 @@ class treap_set_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::erase_and_dispose(const key_type &, Disposer)
|
||||
template<class Disposer>
|
||||
@@ -318,11 +318,11 @@ class treap_set_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
#endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
@@ -422,28 +422,28 @@ class treap_set_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::merge_unique
|
||||
@@ -575,16 +575,16 @@ class treap_set
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(treap_set) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static treap_set &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static treap_set &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<treap_set &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const treap_set &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const treap_set &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const treap_set &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static treap_set &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static treap_set &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<treap_set &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const treap_set &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const treap_set &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const treap_set &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
@@ -600,7 +600,7 @@ class treap_set
|
||||
//! The container supports the following options:
|
||||
//! \c base_hook<>/member_hook<>/value_traits<>,
|
||||
//! \c constant_time_size<>, \c size_type<>,
|
||||
//! \c compare<> and \c priority_compare<>
|
||||
//! \c compare<>, \c priority<> and \c priority_of_value<>
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
template<class T, class ...Options>
|
||||
#else
|
||||
@@ -685,61 +685,61 @@ class treap_multiset_impl
|
||||
~treap_multiset_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::rbegin()
|
||||
reverse_iterator rbegin();
|
||||
reverse_iterator rbegin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::rbegin()const
|
||||
const_reverse_iterator rbegin() const;
|
||||
const_reverse_iterator rbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::crbegin()const
|
||||
const_reverse_iterator crbegin() const;
|
||||
const_reverse_iterator crbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::rend()
|
||||
reverse_iterator rend();
|
||||
reverse_iterator rend() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::rend()const
|
||||
const_reverse_iterator rend() const;
|
||||
const_reverse_iterator rend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::crend()const
|
||||
const_reverse_iterator crend() const;
|
||||
const_reverse_iterator crend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::root()
|
||||
iterator root();
|
||||
iterator root() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::root()const
|
||||
const_iterator root() const;
|
||||
const_iterator root() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::croot()const
|
||||
const_iterator croot() const;
|
||||
const_iterator croot() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::container_from_end_iterator(iterator)
|
||||
static treap_multiset_impl &container_from_end_iterator(iterator end_iterator);
|
||||
static treap_multiset_impl &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::container_from_end_iterator(const_iterator)
|
||||
static const treap_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
|
||||
static const treap_multiset_impl &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::container_from_iterator(iterator)
|
||||
static treap_multiset_impl &container_from_iterator(iterator it);
|
||||
static treap_multiset_impl &container_from_iterator(iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::container_from_iterator(const_iterator)
|
||||
static const treap_multiset_impl &container_from_iterator(const_iterator it);
|
||||
static const treap_multiset_impl &container_from_iterator(const_iterator it) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::key_comp()const
|
||||
key_compare key_comp() const;
|
||||
@@ -748,10 +748,10 @@ class treap_multiset_impl
|
||||
value_compare value_comp() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::swap
|
||||
void swap(treap_multiset_impl& other);
|
||||
@@ -774,22 +774,22 @@ class treap_multiset_impl
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::top()
|
||||
iterator top();
|
||||
BOOST_INTRUSIVE_FORCEINLINE iterator top() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::top()const
|
||||
const_iterator top() const;
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator top() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::ctop()const
|
||||
const_iterator ctop() const;
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_iterator ctop() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::rtop()
|
||||
reverse_iterator rtop();
|
||||
BOOST_INTRUSIVE_FORCEINLINE reverse_iterator rtop() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::rtop()const
|
||||
const_reverse_iterator rtop() const;
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator rtop() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::crtop()const
|
||||
const_reverse_iterator crtop() const;
|
||||
BOOST_INTRUSIVE_FORCEINLINE const_reverse_iterator crtop() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::crtop() const
|
||||
priority_compare priority_comp() const;
|
||||
@@ -810,19 +810,19 @@ class treap_multiset_impl
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
//! @copydoc ::boost::intrusive::treap::insert_before
|
||||
iterator insert_before(const_iterator pos, reference value);
|
||||
iterator insert_before(const_iterator pos, reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::push_back
|
||||
void push_back(reference value);
|
||||
void push_back(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::push_front
|
||||
void push_front(reference value);
|
||||
void push_front(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::erase(const_iterator)
|
||||
iterator erase(const_iterator i);
|
||||
iterator erase(const_iterator i) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::erase(const_iterator,const_iterator)
|
||||
iterator erase(const_iterator b, const_iterator e);
|
||||
iterator erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::erase(const key_type &)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -833,11 +833,11 @@ class treap_multiset_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::erase_and_dispose(const key_type &, Disposer)
|
||||
template<class Disposer>
|
||||
@@ -848,11 +848,11 @@ class treap_multiset_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::count(const key_type &)const
|
||||
size_type count(const key_type &key) const;
|
||||
@@ -938,28 +938,28 @@ class treap_multiset_impl
|
||||
(const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::s_iterator_to(reference)
|
||||
static iterator s_iterator_to(reference value);
|
||||
static iterator s_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::s_iterator_to(const_reference)
|
||||
static const_iterator s_iterator_to(const_reference value);
|
||||
static const_iterator s_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::init_node(reference)
|
||||
static void init_node(reference value);
|
||||
static void init_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::unlink_leftmost_without_rebalance
|
||||
pointer unlink_leftmost_without_rebalance();
|
||||
pointer unlink_leftmost_without_rebalance() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::replace_node
|
||||
void replace_node(iterator replace_this, reference with_this);
|
||||
void replace_node(iterator replace_this, reference with_this) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::remove_node
|
||||
void remove_node(reference value);
|
||||
void remove_node(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::merge_unique
|
||||
template<class ...Options2>
|
||||
@@ -1090,16 +1090,16 @@ class treap_multiset
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(treap_multiset) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static treap_multiset &container_from_end_iterator(iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static treap_multiset &container_from_end_iterator(iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<treap_multiset &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const treap_multiset &container_from_end_iterator(const_iterator end_iterator)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const treap_multiset &container_from_end_iterator(const_iterator end_iterator) BOOST_NOEXCEPT
|
||||
{ return static_cast<const treap_multiset &>(Base::container_from_end_iterator(end_iterator)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static treap_multiset &container_from_iterator(iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static treap_multiset &container_from_iterator(iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<treap_multiset &>(Base::container_from_iterator(it)); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const treap_multiset &container_from_iterator(const_iterator it)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const treap_multiset &container_from_iterator(const_iterator it) BOOST_NOEXCEPT
|
||||
{ return static_cast<const treap_multiset &>(Base::container_from_iterator(it)); }
|
||||
};
|
||||
|
||||
|
||||
@@ -43,12 +43,14 @@ struct trivial_value_traits
|
||||
typedef node_ptr pointer;
|
||||
typedef const_node_ptr const_pointer;
|
||||
static const link_mode_type link_mode = LinkMode;
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr to_node_ptr (value_type &value)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr to_node_ptr (value_type &value) BOOST_NOEXCEPT
|
||||
{ return pointer_traits<node_ptr>::pointer_to(value); }
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_node_ptr to_node_ptr (const value_type &value)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_node_ptr to_node_ptr (const value_type &value) BOOST_NOEXCEPT
|
||||
{ return pointer_traits<const_node_ptr>::pointer_to(value); }
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const pointer & to_value_ptr(const node_ptr &n) { return n; }
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const const_pointer &to_value_ptr(const const_node_ptr &n) { return n; }
|
||||
BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(node_ptr n) BOOST_NOEXCEPT
|
||||
{ return n; }
|
||||
BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const_node_ptr n) BOOST_NOEXCEPT
|
||||
{ return n; }
|
||||
};
|
||||
|
||||
} //namespace intrusive
|
||||
|
||||
@@ -67,7 +67,9 @@ template<class T, class ...Options>
|
||||
template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class SizeType, class BucketTraits, std::size_t BoolFlags>
|
||||
#endif
|
||||
class unordered_set_impl
|
||||
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
: public hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags|hash_bool_flags::unique_keys_pos>
|
||||
#endif
|
||||
{
|
||||
/// @cond
|
||||
private:
|
||||
@@ -115,7 +117,6 @@ class unordered_set_impl
|
||||
typedef typename implementation_defined::node node;
|
||||
typedef typename implementation_defined::node_ptr node_ptr;
|
||||
typedef typename implementation_defined::const_node_ptr const_node_ptr;
|
||||
typedef typename implementation_defined::node_algorithms node_algorithms;
|
||||
|
||||
public:
|
||||
|
||||
@@ -152,22 +153,22 @@ class unordered_set_impl
|
||||
~unordered_set_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::hash_function()const
|
||||
hasher hash_function() const;
|
||||
@@ -176,10 +177,10 @@ class unordered_set_impl
|
||||
key_equal key_eq() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::hashtable
|
||||
void swap(unordered_set_impl& other);
|
||||
@@ -215,11 +216,11 @@ class unordered_set_impl
|
||||
//! @copydoc ::boost::intrusive::hashtable::insert_unique_check(const KeyType&,KeyHasher,KeyEqual,insert_commit_data&)
|
||||
template<class KeyType, class KeyHasher, class KeyEqual>
|
||||
BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert_check
|
||||
(const KeyType &key, KeyHasher hasher, KeyEqual key_value_equal, insert_commit_data &commit_data)
|
||||
{ return table_type::insert_unique_check(key, hasher, key_value_equal, commit_data); }
|
||||
(const KeyType &key, KeyHasher hash_func, KeyEqual key_value_equal, insert_commit_data &commit_data)
|
||||
{ return table_type::insert_unique_check(key, hash_func, key_value_equal, commit_data); }
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::insert_unique_commit
|
||||
BOOST_INTRUSIVE_FORCEINLINE iterator insert_commit(reference value, const insert_commit_data &commit_data)
|
||||
BOOST_INTRUSIVE_FORCEINLINE iterator insert_commit(reference value, const insert_commit_data &commit_data) BOOST_NOEXCEPT
|
||||
{ return table_type::insert_unique_commit(value, commit_data); }
|
||||
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
@@ -228,7 +229,7 @@ class unordered_set_impl
|
||||
void erase(const_iterator i);
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::erase(const_iterator,const_iterator)
|
||||
void erase(const_iterator b, const_iterator e);
|
||||
void erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::erase(const key_type &)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -241,11 +242,11 @@ class unordered_set_impl
|
||||
template<class Disposer>
|
||||
BOOST_INTRUSIVE_DOC1ST(void
|
||||
, typename detail::disable_if_convertible<Disposer BOOST_INTRUSIVE_I const_iterator>::type)
|
||||
erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const key_type &,Disposer)
|
||||
template<class Disposer>
|
||||
@@ -256,11 +257,11 @@ class unordered_set_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::count(const key_type &)const
|
||||
size_type count(const key_type &key) const;
|
||||
@@ -306,28 +307,28 @@ class unordered_set_impl
|
||||
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
//! @copydoc ::boost::intrusive::hashtable::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(reference)
|
||||
static local_iterator s_local_iterator_to(reference value);
|
||||
static local_iterator s_local_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(const_reference)
|
||||
static const_local_iterator s_local_iterator_to(const_reference value);
|
||||
static const_local_iterator s_local_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::local_iterator_to(reference)
|
||||
local_iterator local_iterator_to(reference value);
|
||||
local_iterator local_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::local_iterator_to(const_reference)
|
||||
const_local_iterator local_iterator_to(const_reference value) const;
|
||||
const_local_iterator local_iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::bucket_count
|
||||
size_type bucket_count() const;
|
||||
size_type bucket_count() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::bucket_size
|
||||
size_type bucket_size(size_type n) const;
|
||||
size_type bucket_size(size_type n) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::bucket(const key_type&)const
|
||||
size_type bucket(const key_type& k) const;
|
||||
@@ -337,25 +338,25 @@ class unordered_set_impl
|
||||
size_type bucket(const KeyType& k, KeyHasher hash_func) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::bucket_pointer
|
||||
bucket_ptr bucket_pointer() const;
|
||||
bucket_ptr bucket_pointer() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::begin(size_type)
|
||||
local_iterator begin(size_type n);
|
||||
local_iterator begin(size_type n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::begin(size_type)const
|
||||
const_local_iterator begin(size_type n) const;
|
||||
const_local_iterator begin(size_type n) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::cbegin(size_type)const
|
||||
const_local_iterator cbegin(size_type n) const;
|
||||
const_local_iterator cbegin(size_type n) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::end(size_type)
|
||||
local_iterator end(size_type n);
|
||||
local_iterator end(size_type n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::end(size_type)const
|
||||
const_local_iterator end(size_type n) const;
|
||||
const_local_iterator end(size_type n) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::cend(size_type)const
|
||||
const_local_iterator cend(size_type n) const;
|
||||
const_local_iterator cend(size_type n) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::rehash(const bucket_traits &)
|
||||
void rehash(const bucket_traits &new_bucket_traits);
|
||||
@@ -370,13 +371,13 @@ class unordered_set_impl
|
||||
bool incremental_rehash(const bucket_traits &new_bucket_traits);
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::split_count
|
||||
size_type split_count() const;
|
||||
size_type split_count() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::suggested_upper_bucket_count
|
||||
static size_type suggested_upper_bucket_count(size_type n);
|
||||
static size_type suggested_upper_bucket_count(size_type n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::suggested_lower_bucket_count
|
||||
static size_type suggested_lower_bucket_count(size_type n);
|
||||
static size_type suggested_lower_bucket_count(size_type n) BOOST_NOEXCEPT;
|
||||
|
||||
#endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
@@ -420,6 +421,7 @@ template<class T, class O1 = void, class O2 = void
|
||||
, class O5 = void, class O6 = void
|
||||
, class O7 = void, class O8 = void
|
||||
, class O9 = void, class O10= void
|
||||
, class O11 = void
|
||||
>
|
||||
#endif
|
||||
struct make_unordered_set
|
||||
@@ -428,7 +430,7 @@ struct make_unordered_set
|
||||
typedef typename pack_options
|
||||
< hashtable_defaults,
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
|
||||
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11
|
||||
#else
|
||||
Options...
|
||||
#endif
|
||||
@@ -438,7 +440,7 @@ struct make_unordered_set
|
||||
<T, typename packed_options::proto_value_traits>::type value_traits;
|
||||
|
||||
typedef typename make_bucket_traits
|
||||
<T, true, packed_options>::type bucket_traits;
|
||||
<T, packed_options>::type bucket_traits;
|
||||
|
||||
typedef unordered_set_impl
|
||||
< value_traits
|
||||
@@ -453,6 +455,8 @@ struct make_unordered_set
|
||||
| (std::size_t(packed_options::cache_begin)*hash_bool_flags::cache_begin_pos)
|
||||
| (std::size_t(packed_options::compare_hash)*hash_bool_flags::compare_hash_pos)
|
||||
| (std::size_t(packed_options::incremental)*hash_bool_flags::incremental_pos)
|
||||
| (std::size_t(packed_options::linear_buckets)*hash_bool_flags::linear_buckets_pos)
|
||||
| (std::size_t(packed_options::fastmod_buckets)*hash_bool_flags::fastmod_buckets_pos)
|
||||
> implementation_defined;
|
||||
|
||||
/// @endcond
|
||||
@@ -462,27 +466,26 @@ struct make_unordered_set
|
||||
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10>
|
||||
template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10, class O11>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class unordered_set
|
||||
: public make_unordered_set<T,
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
|
||||
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11
|
||||
#else
|
||||
Options...
|
||||
#endif
|
||||
>::type
|
||||
{
|
||||
typedef typename make_unordered_set
|
||||
<T,
|
||||
typedef typename make_unordered_set<T,
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
|
||||
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11
|
||||
#else
|
||||
Options...
|
||||
#endif
|
||||
>::type Base;
|
||||
>::type Base;
|
||||
|
||||
//Assert if passed value traits are compatible with the type
|
||||
BOOST_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
|
||||
@@ -526,11 +529,11 @@ class unordered_set
|
||||
|
||||
template <class Cloner, class Disposer>
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(const unordered_set &src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(src, cloner, disposer); }
|
||||
{ this->Base::clone_from(src, cloner, disposer); }
|
||||
|
||||
template <class Cloner, class Disposer>
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(unordered_set) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
{ this->Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -577,7 +580,9 @@ template<class T, class ...Options>
|
||||
template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class SizeType, class BucketTraits, std::size_t BoolFlags>
|
||||
#endif
|
||||
class unordered_multiset_impl
|
||||
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
: public hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags>
|
||||
#endif
|
||||
{
|
||||
/// @cond
|
||||
private:
|
||||
@@ -613,7 +618,6 @@ class unordered_multiset_impl
|
||||
typedef typename implementation_defined::node node;
|
||||
typedef typename implementation_defined::node_ptr node_ptr;
|
||||
typedef typename implementation_defined::const_node_ptr const_node_ptr;
|
||||
typedef typename implementation_defined::node_algorithms node_algorithms;
|
||||
|
||||
public:
|
||||
|
||||
@@ -653,22 +657,22 @@ class unordered_multiset_impl
|
||||
~unordered_multiset_impl();
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::begin()
|
||||
iterator begin();
|
||||
iterator begin() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::begin()const
|
||||
const_iterator begin() const;
|
||||
const_iterator begin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::cbegin()const
|
||||
const_iterator cbegin() const;
|
||||
const_iterator cbegin() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::end()
|
||||
iterator end();
|
||||
iterator end() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::end()const
|
||||
const_iterator end() const;
|
||||
const_iterator end() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::cend()const
|
||||
const_iterator cend() const;
|
||||
const_iterator cend() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::hash_function()const
|
||||
hasher hash_function() const;
|
||||
@@ -677,10 +681,10 @@ class unordered_multiset_impl
|
||||
key_equal key_eq() const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::empty()const
|
||||
bool empty() const;
|
||||
bool empty() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::size()const
|
||||
size_type size() const;
|
||||
size_type size() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::hashtable
|
||||
void swap(unordered_multiset_impl& other);
|
||||
@@ -715,7 +719,7 @@ class unordered_multiset_impl
|
||||
void erase(const_iterator i);
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::erase(const_iterator,const_iterator)
|
||||
void erase(const_iterator b, const_iterator e);
|
||||
void erase(const_iterator b, const_iterator e) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::erase(const key_type &)
|
||||
size_type erase(const key_type &key);
|
||||
@@ -728,11 +732,11 @@ class unordered_multiset_impl
|
||||
template<class Disposer>
|
||||
BOOST_INTRUSIVE_DOC1ST(void
|
||||
, typename detail::disable_if_convertible<Disposer BOOST_INTRUSIVE_I const_iterator>::type)
|
||||
erase_and_dispose(const_iterator i, Disposer disposer);
|
||||
erase_and_dispose(const_iterator i, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const_iterator,const_iterator,Disposer)
|
||||
template<class Disposer>
|
||||
void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
|
||||
void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const key_type &,Disposer)
|
||||
template<class Disposer>
|
||||
@@ -743,11 +747,11 @@ class unordered_multiset_impl
|
||||
size_type erase_and_dispose(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func, Disposer disposer);
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::clear
|
||||
void clear();
|
||||
void clear() BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::clear_and_dispose
|
||||
template<class Disposer>
|
||||
void clear_and_dispose(Disposer disposer);
|
||||
void clear_and_dispose(Disposer disposer) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::count(const key_type &)const
|
||||
size_type count(const key_type &key) const;
|
||||
@@ -787,28 +791,28 @@ class unordered_multiset_impl
|
||||
equal_range(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::iterator_to(reference)
|
||||
iterator iterator_to(reference value);
|
||||
iterator iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::iterator_to(const_reference)const
|
||||
const_iterator iterator_to(const_reference value) const;
|
||||
const_iterator iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(reference)
|
||||
static local_iterator s_local_iterator_to(reference value);
|
||||
static local_iterator s_local_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(const_reference)
|
||||
static const_local_iterator s_local_iterator_to(const_reference value);
|
||||
static const_local_iterator s_local_iterator_to(const_reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::local_iterator_to(reference)
|
||||
local_iterator local_iterator_to(reference value);
|
||||
local_iterator local_iterator_to(reference value) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::local_iterator_to(const_reference)
|
||||
const_local_iterator local_iterator_to(const_reference value) const;
|
||||
const_local_iterator local_iterator_to(const_reference value) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::bucket_count
|
||||
size_type bucket_count() const;
|
||||
size_type bucket_count() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::bucket_size
|
||||
size_type bucket_size(size_type n) const;
|
||||
size_type bucket_size(size_type n) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::bucket(const key_type&)const
|
||||
size_type bucket(const key_type& k) const;
|
||||
@@ -818,25 +822,25 @@ class unordered_multiset_impl
|
||||
size_type bucket(const KeyType& k, KeyHasher hash_func) const;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::bucket_pointer
|
||||
bucket_ptr bucket_pointer() const;
|
||||
bucket_ptr bucket_pointer() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::begin(size_type)
|
||||
local_iterator begin(size_type n);
|
||||
local_iterator begin(size_type n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::begin(size_type)const
|
||||
const_local_iterator begin(size_type n) const;
|
||||
const_local_iterator begin(size_type n) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::cbegin(size_type)const
|
||||
const_local_iterator cbegin(size_type n) const;
|
||||
const_local_iterator cbegin(size_type n) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::end(size_type)
|
||||
local_iterator end(size_type n);
|
||||
local_iterator end(size_type n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::end(size_type)const
|
||||
const_local_iterator end(size_type n) const;
|
||||
const_local_iterator end(size_type n) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::cend(size_type)const
|
||||
const_local_iterator cend(size_type n) const;
|
||||
const_local_iterator cend(size_type n) const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::rehash(const bucket_traits &)
|
||||
void rehash(const bucket_traits &new_bucket_traits);
|
||||
@@ -851,13 +855,13 @@ class unordered_multiset_impl
|
||||
bool incremental_rehash(const bucket_traits &new_bucket_traits);
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::split_count
|
||||
size_type split_count() const;
|
||||
size_type split_count() const BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::suggested_upper_bucket_count
|
||||
static size_type suggested_upper_bucket_count(size_type n);
|
||||
static size_type suggested_upper_bucket_count(size_type n) BOOST_NOEXCEPT;
|
||||
|
||||
//! @copydoc ::boost::intrusive::hashtable::suggested_lower_bucket_count
|
||||
static size_type suggested_lower_bucket_count(size_type n);
|
||||
static size_type suggested_lower_bucket_count(size_type n) BOOST_NOEXCEPT;
|
||||
|
||||
#endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
};
|
||||
@@ -872,6 +876,7 @@ template<class T, class O1 = void, class O2 = void
|
||||
, class O5 = void, class O6 = void
|
||||
, class O7 = void, class O8 = void
|
||||
, class O9 = void, class O10= void
|
||||
, class O11 = void
|
||||
>
|
||||
#endif
|
||||
struct make_unordered_multiset
|
||||
@@ -880,7 +885,7 @@ struct make_unordered_multiset
|
||||
typedef typename pack_options
|
||||
< hashtable_defaults,
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
|
||||
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11
|
||||
#else
|
||||
Options...
|
||||
#endif
|
||||
@@ -890,7 +895,7 @@ struct make_unordered_multiset
|
||||
<T, typename packed_options::proto_value_traits>::type value_traits;
|
||||
|
||||
typedef typename make_bucket_traits
|
||||
<T, true, packed_options>::type bucket_traits;
|
||||
<T, packed_options>::type bucket_traits;
|
||||
|
||||
typedef unordered_multiset_impl
|
||||
< value_traits
|
||||
@@ -905,6 +910,8 @@ struct make_unordered_multiset
|
||||
| (std::size_t(packed_options::cache_begin)*hash_bool_flags::cache_begin_pos)
|
||||
| (std::size_t(packed_options::compare_hash)*hash_bool_flags::compare_hash_pos)
|
||||
| (std::size_t(packed_options::incremental)*hash_bool_flags::incremental_pos)
|
||||
| (std::size_t(packed_options::linear_buckets)*hash_bool_flags::linear_buckets_pos)
|
||||
| (std::size_t(packed_options::fastmod_buckets)*hash_bool_flags::fastmod_buckets_pos)
|
||||
> implementation_defined;
|
||||
|
||||
/// @endcond
|
||||
@@ -914,14 +921,14 @@ struct make_unordered_multiset
|
||||
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10>
|
||||
template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10, class O11>
|
||||
#else
|
||||
template<class T, class ...Options>
|
||||
#endif
|
||||
class unordered_multiset
|
||||
: public make_unordered_multiset<T,
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
|
||||
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11
|
||||
#else
|
||||
Options...
|
||||
#endif
|
||||
@@ -977,11 +984,11 @@ class unordered_multiset
|
||||
|
||||
template <class Cloner, class Disposer>
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(const unordered_multiset &src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(src, cloner, disposer); }
|
||||
{ this->Base::clone_from(src, cloner, disposer); }
|
||||
|
||||
template <class Cloner, class Disposer>
|
||||
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(unordered_multiset) src, Cloner cloner, Disposer disposer)
|
||||
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
{ this->Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -82,22 +82,22 @@ struct unordered_node_traits
|
||||
static const bool store_hash = StoreHash;
|
||||
static const bool optimize_multikey = OptimizeMultiKey;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const_node_ptr n) BOOST_NOEXCEPT
|
||||
{ return pointer_traits<node_ptr>::static_cast_from(n->next_); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next) BOOST_NOEXCEPT
|
||||
{ n->next_ = next; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_prev_in_group(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_prev_in_group(const_node_ptr n) BOOST_NOEXCEPT
|
||||
{ return n->prev_in_group_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_prev_in_group(node_ptr n, node_ptr prev)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_prev_in_group(node_ptr n, node_ptr prev) BOOST_NOEXCEPT
|
||||
{ n->prev_in_group_ = prev; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static std::size_t get_hash(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static std::size_t get_hash(const_node_ptr n) BOOST_NOEXCEPT
|
||||
{ return n->hash_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_hash(const node_ptr & n, std::size_t h)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_hash(node_ptr n, std::size_t h) BOOST_NOEXCEPT
|
||||
{ n->hash_ = h; }
|
||||
};
|
||||
|
||||
@@ -108,10 +108,10 @@ struct unordered_group_adapter
|
||||
typedef typename NodeTraits::node_ptr node_ptr;
|
||||
typedef typename NodeTraits::const_node_ptr const_node_ptr;
|
||||
|
||||
static node_ptr get_next(const const_node_ptr & n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const_node_ptr n)
|
||||
{ return NodeTraits::get_prev_in_group(n); }
|
||||
|
||||
static void set_next(node_ptr n, node_ptr next)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
|
||||
{ NodeTraits::set_prev_in_group(n, next); }
|
||||
};
|
||||
|
||||
@@ -127,19 +127,19 @@ struct unordered_algorithms
|
||||
typedef typename NodeTraits::node_ptr node_ptr;
|
||||
typedef typename NodeTraits::const_node_ptr const_node_ptr;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init(typename base_type::node_ptr n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init(typename base_type::node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
base_type::init(n);
|
||||
group_algorithms::init(n);
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init_header(typename base_type::node_ptr n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init_header(typename base_type::node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
base_type::init_header(n);
|
||||
group_algorithms::init_header(n);
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void unlink(typename base_type::node_ptr n)
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void unlink(typename base_type::node_ptr n) BOOST_NOEXCEPT
|
||||
{
|
||||
base_type::unlink(n);
|
||||
group_algorithms::unlink(n);
|
||||
@@ -258,7 +258,7 @@ class unordered_set_base_hook
|
||||
//! initializes the node to an unlinked state.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
unordered_set_base_hook();
|
||||
unordered_set_base_hook() BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
|
||||
//! initializes the node to an unlinked state. The argument is ignored.
|
||||
@@ -269,7 +269,7 @@ class unordered_set_base_hook
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
unordered_set_base_hook(const unordered_set_base_hook& );
|
||||
unordered_set_base_hook(const unordered_set_base_hook& ) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Empty function. The argument is ignored.
|
||||
//!
|
||||
@@ -279,7 +279,7 @@ class unordered_set_base_hook
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
unordered_set_base_hook& operator=(const unordered_set_base_hook& );
|
||||
unordered_set_base_hook& operator=(const unordered_set_base_hook& ) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c normal_link, the destructor does
|
||||
//! nothing (ie. no code is generated). If link_mode is \c safe_link and the
|
||||
@@ -301,7 +301,7 @@ class unordered_set_base_hook
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void swap_nodes(unordered_set_base_hook &other);
|
||||
void swap_nodes(unordered_set_base_hook &other) BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Precondition</b>: link_mode must be \c safe_link or \c auto_unlink.
|
||||
//!
|
||||
@@ -310,13 +310,13 @@ class unordered_set_base_hook
|
||||
//! will return a valid iterator.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
bool is_linked() const;
|
||||
bool is_linked() const BOOST_NOEXCEPT;
|
||||
|
||||
//! <b>Effects</b>: Removes the node if it's inserted in a container.
|
||||
//! This function is only allowed if link_mode is \c auto_unlink.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void unlink();
|
||||
void unlink() BOOST_NOEXCEPT;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user