Take all pointers by value to avoid aliasing issues in release mode

This commit is contained in:
Ion Gaztañaga
2021-12-29 14:02:03 +01:00
parent 56291fafe4
commit 01b4f6264c
38 changed files with 352 additions and 349 deletions

View File

@@ -46,14 +46,14 @@ struct avltree_node_cloner
: base_t(f)
{}
BOOST_INTRUSIVE_FORCEINLINE node_ptr operator()(const node_ptr & p)
BOOST_INTRUSIVE_FORCEINLINE 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
BOOST_INTRUSIVE_FORCEINLINE 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,14 +166,14 @@ 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) BOOST_NOEXCEPT;
//! @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) BOOST_NOEXCEPT;
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) BOOST_NOEXCEPT;
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) BOOST_NOEXCEPT;
@@ -230,22 +230,22 @@ class avltree_algorithms
#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) BOOST_NOEXCEPT;
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) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const_node_ptr)
static bool unique(const_node_ptr node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
static std::size_t size(const const_node_ptr & header) BOOST_NOEXCEPT;
//! @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) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::next_node(node_ptr)
static node_ptr next_node(node_ptr node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
static node_ptr prev_node(const node_ptr & node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(node_ptr)
static node_ptr prev_node(node_ptr node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::init(node_ptr)
static void init(const node_ptr & node) BOOST_NOEXCEPT;
static void init(node_ptr node) BOOST_NOEXCEPT;
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! <b>Requires</b>: node must not be part of any tree.
@@ -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) BOOST_NOEXCEPT;
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
@@ -398,16 +398,16 @@ class avltree_algorithms
}
#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
@@ -420,12 +420,12 @@ class avltree_algorithms
}
//! @copydoc ::boost::intrusive::bstree_algorithms::is_header
static bool is_header(const const_node_ptr & p) BOOST_NOEXCEPT
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;

View File

@@ -202,8 +202,8 @@ struct bstbase3
BOOST_INTRUSIVE_FORCEINLINE void rebalance() BOOST_NOEXCEPT
{ node_algorithms::rebalance(this->header_ptr()); }
iterator rebalance_subtree(iterator root) BOOST_NOEXCEPT
{ 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) BOOST_NOEXCEPT
{
@@ -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);
}
@@ -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();
}
}
@@ -1325,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
@@ -1943,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) BOOST_NOEXCEPT;
iterator rebalance_subtree(iterator r) BOOST_NOEXCEPT;
#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)

View File

@@ -80,7 +80,7 @@ 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)
{
@@ -186,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)
{}
@@ -213,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_NOEXCEPT
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.
@@ -223,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_NOEXCEPT
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.
@@ -233,7 +233,7 @@ 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)
{
node_ptr p = node_traits::get_parent(header);
return p ? p : detail::uncast(header);
@@ -247,7 +247,7 @@ 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) BOOST_NOEXCEPT
BOOST_INTRUSIVE_FORCEINLINE static bool unique(const_node_ptr node) BOOST_NOEXCEPT
{ return !NodeTraits::get_parent(node); }
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
@@ -258,7 +258,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <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 node);
#endif
//! <b>Requires</b>: node1 and node2 can't be header nodes
@@ -528,7 +528,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <b>Complexity</b>: Average constant time.
//!
//! <b>Throws</b>: Nothing.
static node_ptr next_node(const node_ptr & node) BOOST_NOEXCEPT;
static node_ptr next_node(node_ptr node) BOOST_NOEXCEPT;
//! <b>Requires</b>: 'node' is a node from the tree except the leftmost node.
//!
@@ -537,7 +537,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <b>Complexity</b>: Average constant time.
//!
//! <b>Throws</b>: Nothing.
static node_ptr prev_node(const node_ptr & node) BOOST_NOEXCEPT;
static node_ptr prev_node(node_ptr node) BOOST_NOEXCEPT;
//! <b>Requires</b>: 'node' is a node of a tree but not the header.
//!
@@ -579,7 +579,7 @@ 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)
BOOST_INTRUSIVE_FORCEINLINE static bool inited(const_node_ptr node)
{
return !NodeTraits::get_parent(node) &&
!NodeTraits::get_left(node) &&
@@ -607,7 +607,7 @@ 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.
@@ -615,7 +615,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//!
//! <b>Throws</b>: Nothing.
template<class Disposer>
static void clear_and_dispose(const node_ptr & header, Disposer disposer) BOOST_NOEXCEPT
static void clear_and_dispose(node_ptr header, Disposer disposer) BOOST_NOEXCEPT
{
node_ptr source_root = NodeTraits::get_parent(header);
if(!source_root)
@@ -674,7 +674,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <b>Complexity</b>: Linear time.
//!
//! <b>Throws</b>: Nothing.
static std::size_t size(const const_node_ptr & header) BOOST_NOEXCEPT
static std::size_t size(const_node_ptr header) BOOST_NOEXCEPT
{
node_ptr beg(begin_node(header));
node_ptr end(end_node(header));
@@ -740,7 +740,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) BOOST_NOEXCEPT;
static bool is_header(const_node_ptr p) BOOST_NOEXCEPT;
#endif
//! <b>Requires</b>: "header" must be the header node of a tree.
@@ -756,7 +756,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);
@@ -786,7 +786,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
@@ -853,7 +853,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;
@@ -879,7 +879,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);
}
@@ -899,7 +899,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);
@@ -923,7 +923,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);
}
@@ -941,7 +941,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);
}
@@ -1003,7 +1003,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
@@ -1081,7 +1081,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
@@ -1287,13 +1287,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.
@@ -1301,7 +1301,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);
@@ -1458,7 +1458,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){
@@ -1595,7 +1595,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
//! <b>Complexity</b>: Linear time.
//!
//! <b>Throws</b>: Nothing.
static std::size_t subtree_size(const const_node_ptr & subtree) BOOST_NOEXCEPT
static std::size_t subtree_size(const_node_ptr subtree) BOOST_NOEXCEPT
{
std::size_t count = 0;
if (subtree){
@@ -1638,7 +1638,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_NOEXCEPT
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.
@@ -1648,7 +1648,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_NOEXCEPT
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
@@ -1919,7 +1919,7 @@ 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) BOOST_NOEXCEPT
static node_ptr get_root(node_ptr node) BOOST_NOEXCEPT
{
BOOST_INTRUSIVE_INVARIANT_ASSERT((!inited(node)));
node_ptr x = NodeTraits::get_parent(node);
@@ -1936,7 +1936,7 @@ class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
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
)
@@ -2062,7 +2062,7 @@ 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 node, Checker checker, typename Checker::return_type& check_return)
{
const_node_ptr left = NodeTraits::get_left(node);
const_node_ptr right = NodeTraits::get_right(node);

View File

@@ -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_NOEXCEPT
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
@@ -105,7 +105,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) BOOST_NOEXCEPT
BOOST_INTRUSIVE_FORCEINLINE static bool unique(const_node_ptr this_node) BOOST_NOEXCEPT
{
node_ptr next = NodeTraits::get_next(this_node);
return !next || next == this_node;
@@ -119,7 +119,7 @@ class circular_list_algorithms
//! <b>Complexity</b>: Linear
//!
//! <b>Throws</b>: Nothing.
static std::size_t count(const const_node_ptr &this_node) BOOST_NOEXCEPT
static std::size_t count(const_node_ptr this_node) BOOST_NOEXCEPT
{
std::size_t result = 0;
const_node_ptr p = this_node;
@@ -358,12 +358,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) BOOST_NOEXCEPT
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;

View File

@@ -153,7 +153,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_NOEXCEPT
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 +163,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_NOEXCEPT
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 +173,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_NOEXCEPT
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 +185,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) BOOST_NOEXCEPT
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 +205,7 @@ class circular_slist_algorithms
//! <b>Complexity</b>: Linear
//!
//! <b>Throws</b>: Nothing.
static std::size_t count(const const_node_ptr & this_node) BOOST_NOEXCEPT
static std::size_t count(const_node_ptr this_node) BOOST_NOEXCEPT
{
std::size_t result = 0;
const_node_ptr p = this_node;

View File

@@ -58,12 +58,12 @@ struct derivation_value_traits
BOOST_INTRUSIVE_FORCEINLINE static const_node_ptr to_node_ptr(const_reference value) BOOST_NOEXCEPT
{ return node_ptr(&value); }
BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(const node_ptr &n) BOOST_NOEXCEPT
BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(node_ptr n) BOOST_NOEXCEPT
{
return pointer_traits<pointer>::pointer_to(static_cast<reference>(*n));
}
BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const const_node_ptr &n) BOOST_NOEXCEPT
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));
}

View File

@@ -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)
@@ -252,7 +252,7 @@ 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) BOOST_NOEXCEPT
BOOST_INTRUSIVE_FORCEINLINE static void init(node_ptr node) BOOST_NOEXCEPT
{ node->node_ptr_1 = node_ptr(); };
//! <b>Effects</b>: Returns true if node is in the same state as if called init(node)
@@ -260,19 +260,19 @@ class any_algorithms
//! <b>Complexity</b>: Constant.
//!
//! <b>Throws</b>: Nothing.
BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr & node)
BOOST_INTRUSIVE_FORCEINLINE static bool inited(const_node_ptr node)
{ return !node->node_ptr_1; };
BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr & node) BOOST_NOEXCEPT
BOOST_INTRUSIVE_FORCEINLINE static bool unique(const_node_ptr node) BOOST_NOEXCEPT
{ return !node->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

View File

@@ -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()

View File

@@ -42,7 +42,7 @@ class bstree_algorithms_base
//! <b>Complexity</b>: Average constant time.
//!
//! <b>Throws</b>: Nothing.
static node_ptr next_node(const node_ptr & node) BOOST_NOEXCEPT
static node_ptr next_node(node_ptr node) BOOST_NOEXCEPT
{
node_ptr const n_right(NodeTraits::get_right(node));
if(n_right){
@@ -66,7 +66,7 @@ class bstree_algorithms_base
//! <b>Complexity</b>: Average constant time.
//!
//! <b>Throws</b>: Nothing.
static node_ptr prev_node(const node_ptr & node) BOOST_NOEXCEPT
static node_ptr prev_node(node_ptr node) BOOST_NOEXCEPT
{
if(is_header(node)){
return NodeTraits::get_right(node);
@@ -126,7 +126,7 @@ class bstree_algorithms_base
//! <b>Complexity</b>: Constant.
//!
//! <b>Throws</b>: Nothing.
static bool is_header(const const_node_ptr & p) BOOST_NOEXCEPT
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));
@@ -150,7 +150,7 @@ class bstree_algorithms_base
//! <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 node)
{
node_ptr n(detail::uncast(node));
node_ptr p(NodeTraits::get_parent(node));

View File

@@ -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))
@@ -55,13 +55,13 @@ class common_slist_algorithms
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)
BOOST_INTRUSIVE_FORCEINLINE static bool unique(const_node_ptr this_node)
{
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)
{ return !NodeTraits::get_next(this_node); }
BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(node_ptr prev_node) BOOST_NOEXCEPT
@@ -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) BOOST_NOEXCEPT
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;

View File

@@ -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)); }
};

View File

@@ -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{

View File

@@ -98,7 +98,7 @@ struct bucket_traits_impl
buckets_ = x.buckets_; buckets_len_ = x.buckets_len_; return *this;
}
BOOST_INTRUSIVE_FORCEINLINE const bucket_ptr &bucket_begin() const
BOOST_INTRUSIVE_FORCEINLINE bucket_ptr bucket_begin() const
{ return buckets_; }
BOOST_INTRUSIVE_FORCEINLINE size_type bucket_count() const BOOST_NOEXCEPT
@@ -242,7 +242,7 @@ 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

View File

@@ -55,7 +55,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 +63,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 +132,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 +174,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)); }
};

View File

@@ -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,7 +81,7 @@ class list_iterator
BOOST_INTRUSIVE_FORCEINLINE node_ptr pointed_node() const
{ return members_.nodeptr_; }
BOOST_INTRUSIVE_FORCEINLINE list_iterator &operator=(const node_ptr &nodeptr)
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

View File

@@ -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)

View File

@@ -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));
@@ -89,7 +89,7 @@ struct node_disposer
: base_t(f), traits_(cont)
{}
BOOST_INTRUSIVE_FORCEINLINE void operator()(const node_ptr & p)
BOOST_INTRUSIVE_FORCEINLINE void operator()(node_ptr p)
{
BOOST_IF_CONSTEXPR(safemode_or_autounlink)
node_algorithms::init(p);

View File

@@ -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)
{}

View File

@@ -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()

View File

@@ -41,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); }
};

View File

@@ -65,7 +65,7 @@ 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 explicit slist_iterator(node_ptr nodeptr, const_value_traits_ptr traits_ptr)
: members_(nodeptr, traits_ptr)
{}
@@ -83,7 +83,7 @@ class slist_iterator
BOOST_INTRUSIVE_FORCEINLINE node_ptr pointed_node() const
{ return members_.nodeptr_; }
BOOST_INTRUSIVE_FORCEINLINE slist_iterator &operator=(const node_ptr &n)
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

View File

@@ -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)

View File

@@ -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

View File

@@ -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)

View File

@@ -426,7 +426,7 @@ struct group_functions
}
}
BOOST_INTRUSIVE_FORCEINLINE static void erase_from_group(const slist_node_ptr&, const node_ptr&, detail::false_)
BOOST_INTRUSIVE_FORCEINLINE static void erase_from_group(slist_node_ptr, node_ptr, detail::false_)
{}
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_last_in_group(node_ptr first_in_group, detail::true_)
@@ -455,7 +455,7 @@ struct group_functions
BOOST_INTRUSIVE_FORCEINLINE static void insert_in_group(node_ptr first_in_group, node_ptr n, true_)
{ group_algorithms::link_after(first_in_group, n); }
static void insert_in_group(const node_ptr&, const node_ptr&, false_)
static void insert_in_group(node_ptr, node_ptr, false_)
{}
BOOST_INTRUSIVE_FORCEINLINE static node_ptr split_group(node_ptr const new_first_in_group)
@@ -620,7 +620,7 @@ struct downcast_node_to_value_t
template rebind_pointer
<const ValueTraits>::type const_value_traits_ptr;
BOOST_INTRUSIVE_FORCEINLINE downcast_node_to_value_t(const const_value_traits_ptr &ptr)
BOOST_INTRUSIVE_FORCEINLINE downcast_node_to_value_t(const_value_traits_ptr ptr)
: base_t(ptr)
{}
@@ -1159,7 +1159,7 @@ struct bucket_hash_equal_t
BOOST_INTRUSIVE_FORCEINLINE bucket_ptr priv_get_cache()
{ return this->bucket_hash_type::priv_bucket_pointer(); }
BOOST_INTRUSIVE_FORCEINLINE void priv_set_cache(const bucket_ptr &)
BOOST_INTRUSIVE_FORCEINLINE void priv_set_cache(bucket_ptr)
{}
BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_get_cache_bucket_num()
@@ -1229,13 +1229,10 @@ struct bucket_hash_equal_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrK
typedef typename detail::unordered_bucket_ptr_impl
<typename bucket_hash_type::value_traits>::type bucket_ptr;
BOOST_INTRUSIVE_FORCEINLINE bucket_ptr &priv_get_cache()
BOOST_INTRUSIVE_FORCEINLINE bucket_ptr priv_get_cache() const
{ return cached_begin_; }
BOOST_INTRUSIVE_FORCEINLINE const bucket_ptr &priv_get_cache() const
{ return cached_begin_; }
BOOST_INTRUSIVE_FORCEINLINE void priv_set_cache(const bucket_ptr &p)
BOOST_INTRUSIVE_FORCEINLINE void priv_set_cache(bucket_ptr p)
{ cached_begin_ = p; }
BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_get_cache_bucket_num()
@@ -1291,8 +1288,8 @@ struct bucket_hash_equal_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrK
std::size_t current_n = std::size_t(this->priv_get_cache() - this->bucket_hash_type::priv_bucket_pointer());
for( const std::size_t num_buckets = this->bucket_hash_type::priv_bucket_count()
; current_n < num_buckets
; ++current_n, ++this->priv_get_cache()){
if(!this->priv_get_cache()->empty()){
; ++current_n, ++cached_begin_){
if(!cached_begin_->empty()){
return;
}
}

View File

@@ -78,7 +78,7 @@ class linear_slist_algorithms
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
static void init(const node_ptr & this_node) BOOST_NOEXCEPT;
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.
//!
@@ -106,7 +106,7 @@ class linear_slist_algorithms
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
static void unlink_after(const node_ptr & prev_node) BOOST_NOEXCEPT;
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.
@@ -116,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) BOOST_NOEXCEPT;
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.
//!
@@ -125,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) BOOST_NOEXCEPT;
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.
@@ -136,7 +136,7 @@ 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) BOOST_NOEXCEPT;
static void transfer_after(node_ptr p, node_ptr b, node_ptr e) BOOST_NOEXCEPT;
#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
@@ -147,7 +147,7 @@ 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_NOEXCEPT
BOOST_INTRUSIVE_FORCEINLINE static void init_header(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 linear list.
@@ -160,7 +160,7 @@ class linear_slist_algorithms
//!
//! <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_NOEXCEPT
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.
@@ -171,7 +171,7 @@ class linear_slist_algorithms
//! <b>Complexity</b>: Linear
//!
//! <b>Throws</b>: Nothing.
static std::size_t count(const const_node_ptr & this_node) BOOST_NOEXCEPT
static std::size_t count(const_node_ptr this_node) BOOST_NOEXCEPT
{
std::size_t result = 0;
const_node_ptr p = this_node;

View File

@@ -638,7 +638,8 @@ class list_impl
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);
BOOST_IF_CONSTEXPR(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{

View File

@@ -63,13 +63,13 @@ struct member_value_traits
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_NOEXCEPT
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_NOEXCEPT
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));

View File

@@ -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,14 +190,14 @@ 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) BOOST_NOEXCEPT;
//! @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) BOOST_NOEXCEPT;
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) BOOST_NOEXCEPT;
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) BOOST_NOEXCEPT;
@@ -242,7 +242,7 @@ class rbtree_algorithms
}
//! @copydoc ::boost::intrusive::bstree_algorithms::unlink(node_ptr)
static void unlink(const node_ptr& node) BOOST_NOEXCEPT
static void unlink(node_ptr node) BOOST_NOEXCEPT
{
node_ptr x = NodeTraits::get_parent(node);
if(x){
@@ -254,22 +254,22 @@ class rbtree_algorithms
#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) BOOST_NOEXCEPT;
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) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const_node_ptr)
static bool unique(const_node_ptr node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
static std::size_t size(const const_node_ptr & header) BOOST_NOEXCEPT;
//! @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) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const_node_ptr)
static node_ptr next_node(node_ptr node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
static node_ptr prev_node(const node_ptr & node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const_node_ptr)
static node_ptr prev_node(node_ptr node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::init(node_ptr)
static void init(const node_ptr & node) BOOST_NOEXCEPT;
static void init(node_ptr node) BOOST_NOEXCEPT;
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! @copydoc ::boost::intrusive::bstree_algorithms::init_header(node_ptr)
@@ -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) BOOST_NOEXCEPT;
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
@@ -413,13 +413,13 @@ class rbtree_algorithms
}
#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
@@ -435,7 +435,7 @@ class rbtree_algorithms
}
//! @copydoc ::boost::intrusive::bstree_algorithms::is_header
static bool is_header(const const_node_ptr & p) BOOST_NOEXCEPT
static bool is_header(const_node_ptr p) BOOST_NOEXCEPT
{
return NodeTraits::get_color(p) == NodeTraits::red() &&
bstree_algo::is_header(p);

View File

@@ -85,7 +85,7 @@ class sgtree_algorithms
};
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
//! @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
@@ -115,16 +115,16 @@ class sgtree_algorithms
//! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
static node_ptr unlink_leftmost_without_rebalance(node_ptr header) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const_node_ptr)
static bool unique(const_node_ptr node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
//! @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&)
//! @copydoc ::boost::intrusive::bstree_algorithms::next_node(node_ptr)
static node_ptr next_node(node_ptr node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(node_ptr)
static node_ptr prev_node(node_ptr node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::init(node_ptr)
@@ -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) 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);
@@ -258,7 +258,7 @@ class sgtree_algorithms
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

View File

@@ -191,7 +191,7 @@ class slist_impl
const_node_ptr get_last_node() const
{ return this->get_last_node(detail::bool_<cache_last>()); }
void set_last_node(const node_ptr &n)
void set_last_node(node_ptr n)
{ return this->set_last_node(n, detail::bool_<cache_last>()); }
static node_ptr get_last_node(detail::bool_<false>)
@@ -201,7 +201,7 @@ class slist_impl
return node_ptr();
}
static void set_last_node(const node_ptr &, detail::bool_<false>)
static void set_last_node(node_ptr , detail::bool_<false>)
{
//This function shall not be used if cache_last is not true
BOOST_INTRUSIVE_INVARIANT_ASSERT(cache_last);
@@ -213,7 +213,7 @@ class slist_impl
const_node_ptr get_last_node(detail::bool_<true>) const
{ return const_node_ptr(data_.root_plus_size_.last_); }
void set_last_node(const node_ptr & n, detail::bool_<true>)
void set_last_node(node_ptr n, detail::bool_<true>)
{ data_.root_plus_size_.last_ = n; }
void set_default_constructed_state()
@@ -281,7 +281,7 @@ class slist_impl
//! list. Iterators of this list and all the references are not invalidated.
//!
//! <b>Warning</b>: Experimental function, don't use it!
slist_impl( const node_ptr & f, const node_ptr & before_l
slist_impl( node_ptr f, node_ptr before_l
, size_type n, const value_traits &v_traits = value_traits())
: data_(v_traits)
{
@@ -960,6 +960,7 @@ class slist_impl
iterator erase_after(const_iterator before_f, const_iterator l, size_type n) BOOST_NOEXCEPT
{
BOOST_INTRUSIVE_INVARIANT_ASSERT(node_algorithms::distance((++const_iterator(before_f)).pointed_node(), l.pointed_node()) == n);
(void)n;
BOOST_IF_CONSTEXPR(safemode_or_autounlink){
return this->erase_after(before_f, l);
}
@@ -1342,6 +1343,7 @@ class slist_impl
void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator before_f, const_iterator before_l, size_type n) BOOST_NOEXCEPT
{
BOOST_INTRUSIVE_INVARIANT_ASSERT(node_algorithms::distance(before_f.pointed_node(), before_l.pointed_node()) == n);
(void)n;
this->priv_splice_after
(prev_pos.pointed_node(), x, before_f.pointed_node(), before_l.pointed_node());
BOOST_IF_CONSTEXPR(constant_time_size){
@@ -1881,7 +1883,7 @@ class slist_impl
//! point to elements of this list. Iterators of this list and all the references are not invalidated.
//!
//! <b>Warning</b>: Experimental function, don't use it!
void incorporate_after(const_iterator prev_pos, const node_ptr & f, const node_ptr & before_l) BOOST_NOEXCEPT
void incorporate_after(const_iterator prev_pos, node_ptr f, node_ptr before_l) BOOST_NOEXCEPT
{
BOOST_IF_CONSTEXPR(constant_time_size)
this->incorporate_after(prev_pos, f, before_l, node_algorithms::distance(f.pointed_node(), before_l.pointed_node())+1);
@@ -1905,7 +1907,7 @@ class slist_impl
//! point to elements of this list. Iterators of this list and all the references are not invalidated.
//!
//! <b>Warning</b>: Experimental function, don't use it!
void incorporate_after(const_iterator prev_pos, const node_ptr & f, const node_ptr & before_l, size_type n) BOOST_NOEXCEPT
void incorporate_after(const_iterator prev_pos, node_ptr f, node_ptr before_l, size_type n) BOOST_NOEXCEPT
{
if(n){
BOOST_INTRUSIVE_INVARIANT_ASSERT(n > 0);
@@ -2208,7 +2210,7 @@ class slist
struct incorporate_t{};
BOOST_INTRUSIVE_FORCEINLINE slist( const node_ptr & f, const node_ptr & before_l
BOOST_INTRUSIVE_FORCEINLINE slist( node_ptr f, node_ptr before_l
, size_type n, const value_traits &v_traits = value_traits())
: Base(f, before_l, n, v_traits)
{}

View File

@@ -175,17 +175,17 @@ 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) BOOST_NOEXCEPT;
//! @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) BOOST_NOEXCEPT;
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) BOOST_NOEXCEPT;
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) BOOST_NOEXCEPT;
@@ -205,16 +205,16 @@ class splaytree_algorithms
//! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
static node_ptr unlink_leftmost_without_rebalance(node_ptr header) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const_node_ptr)
static bool unique(const_node_ptr node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
//! @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&)
//! @copydoc ::boost::intrusive::bstree_algorithms::next_node(node_ptr)
static node_ptr next_node(node_ptr node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(node_ptr)
static node_ptr prev_node(node_ptr node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::init(node_ptr)
@@ -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) 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
@@ -482,7 +482,7 @@ class splaytree_algorithms
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

View File

@@ -49,7 +49,7 @@ 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)
{
@@ -178,7 +178,7 @@ class treap_algorithms
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
//! @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
@@ -219,16 +219,16 @@ class treap_algorithms
//! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
static node_ptr unlink_leftmost_without_rebalance(node_ptr header) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
//! @copydoc ::boost::intrusive::bstree_algorithms::unique(const_node_ptr)
static bool unique(const_node_ptr node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
//! @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&)
//! @copydoc ::boost::intrusive::bstree_algorithms::next_node(node_ptr)
static node_ptr next_node(node_ptr node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
//! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(node_ptr)
static node_ptr prev_node(node_ptr node) BOOST_NOEXCEPT;
//! @copydoc ::boost::intrusive::bstree_algorithms::init(node_ptr)
@@ -248,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) 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);

View File

@@ -47,9 +47,9 @@ struct trivial_value_traits
{ return pointer_traits<node_ptr>::pointer_to(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) BOOST_NOEXCEPT
BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(node_ptr n) BOOST_NOEXCEPT
{ return n; }
BOOST_INTRUSIVE_FORCEINLINE static const const_pointer &to_value_ptr(const const_node_ptr &n) BOOST_NOEXCEPT
BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const_node_ptr n) BOOST_NOEXCEPT
{ return n; }
};

View File

@@ -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_NOEXCEPT
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_NOEXCEPT
{ n->next_ = next; }
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_prev_in_group(const const_node_ptr & n) BOOST_NOEXCEPT
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_NOEXCEPT
{ n->prev_in_group_ = prev; }
BOOST_INTRUSIVE_FORCEINLINE static std::size_t get_hash(const const_node_ptr & n) BOOST_NOEXCEPT
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_NOEXCEPT
BOOST_INTRUSIVE_FORCEINLINE static void set_hash(node_ptr n, std::size_t h) BOOST_NOEXCEPT
{ n->hash_ = h; }
};
@@ -108,7 +108,7 @@ 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)
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)

View File

@@ -31,6 +31,7 @@ class bounded_reference;
template < typename T >
class bounded_allocator;
struct maintain_offset_t{};
template < typename T >
class bounded_pointer
@@ -41,6 +42,7 @@ class bounded_pointer
public:
typedef typename boost::intrusive::detail::remove_const< T >::type mut_val_t;
typedef bounded_pointer< mut_val_t > non_const_t;
typedef const mut_val_t const_val_t;
typedef bounded_reference<T> reference;
@@ -59,6 +61,10 @@ class bounded_pointer
: m_offset(other.m_offset)
{}
bounded_pointer(maintain_offset_t, unsigned char offset)
: m_offset(offset)
{}
bounded_pointer& operator = (const bounded_pointer& other)
{ m_offset = other.m_offset; return *this; }
@@ -67,11 +73,8 @@ class bounded_pointer
operator= (const bounded_pointer<T2> & other)
{ m_offset = other.m_offset; return *this; }
const bounded_pointer< typename boost::intrusive::detail::remove_const< T >::type >& unconst() const
{ return *reinterpret_cast< const bounded_pointer< typename boost::intrusive::detail::remove_const< T >::type >* >(this); }
bounded_pointer< typename boost::intrusive::detail::remove_const< T >::type >& unconst()
{ return *reinterpret_cast< bounded_pointer< typename boost::intrusive::detail::remove_const< T >::type >* >(this); }
non_const_t unconst() const
{ return non_const_t (maintain_offset_t(), this->m_offset); }
static mut_val_t* base()
{

View File

@@ -233,7 +233,6 @@ void test_generic_multiset<ContainerDefiner>::test_find(value_cont_type& values)
typedef typename multiset_type::key_of_value key_of_value;
multiset_type testset (values.begin(), values.end());
typedef typename multiset_type::iterator iterator;
typedef typename multiset_type::const_iterator const_iterator;
{
value_cont_type cmp_val_cont(1);
@@ -255,9 +254,8 @@ void test_generic_multiset<ContainerDefiner>::test_find(value_cont_type& values)
BOOST_TEST (testset.find (7, any_less()) == testset.end());
}
{ //1, 2, 2, 3, 4, 5
const multiset_type &const_testset = testset;
std::pair<iterator,iterator> range;
std::pair<const_iterator, const_iterator> const_range;
value_cont_type cmp_val_cont(2);
typename value_cont_type::reference cmp_val_lower = cmp_val_cont.front();
typename value_cont_type::reference cmp_val_upper = cmp_val_cont.back();
@@ -271,6 +269,9 @@ void test_generic_multiset<ContainerDefiner>::test_find(value_cont_type& values)
BOOST_TEST (range.second->value_ == 3);
BOOST_TEST (boost::intrusive::iterator_distance (range.first, range.second) == 3);
}
const multiset_type &const_testset = testset;
typedef typename multiset_type::const_iterator const_iterator;
std::pair<const_iterator, const_iterator> const_range;
{
(&cmp_val_lower)->value_ = 1;
(&cmp_val_upper)->value_ = 2;

View File

@@ -63,10 +63,10 @@ struct stateful_value_traits
const_node_ptr to_node_ptr (const value_type &value) const
{ return node_array_ + (&value - values_); }
pointer to_value_ptr(const node_ptr &n) const
pointer to_value_ptr(node_ptr n) const
{ return values_ + (n - node_array_); }
const_pointer to_value_ptr(const const_node_ptr &n) const
const_pointer to_value_ptr(const_node_ptr n) const
{ return values_ + (n - node_array_); }
pointer values_;