mirror of
https://github.com/boostorg/intrusive.git
synced 2025-07-31 04:57:32 +02:00
Updated copyright and fixed trailing whitespaces
[SVN r79434]
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -50,7 +50,7 @@ struct make_any_base_hook
|
||||
Options...
|
||||
#endif
|
||||
>::type packed_options;
|
||||
|
||||
|
||||
typedef detail::generic_hook
|
||||
< get_any_node_algo<typename packed_options::void_pointer>
|
||||
, typename packed_options::tag
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -80,7 +80,7 @@ class avl_set_impl
|
||||
|
||||
public:
|
||||
//! <b>Effects</b>: Constructs an empty avl_set.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -111,13 +111,13 @@ class avl_set_impl
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
avl_set_impl(BOOST_RV_REF(avl_set_impl) x)
|
||||
: tree_(::boost::move(x.tree_))
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
avl_set_impl& operator=(BOOST_RV_REF(avl_set_impl) x)
|
||||
{ tree_ = ::boost::move(x.tree_); return *this; }
|
||||
|
||||
@ -343,7 +343,7 @@ class avl_set_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
|
||||
@ -453,7 +453,7 @@ class avl_set_impl
|
||||
//! If the check is successful, the user can construct the value_type and use
|
||||
//! "insert_commit" to insert the object in constant-time. This can give a total
|
||||
//! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
|
||||
//!
|
||||
//!
|
||||
//! "commit_data" remains valid for a subsequent "insert_commit" only if no more
|
||||
//! objects are inserted or erased from the avl_set.
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
@ -1290,7 +1290,7 @@ class avl_multiset_impl
|
||||
|
||||
public:
|
||||
//! <b>Effects</b>: Constructs an empty avl_multiset.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -1321,13 +1321,13 @@ class avl_multiset_impl
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
avl_multiset_impl(BOOST_RV_REF(avl_multiset_impl) x)
|
||||
: tree_(::boost::move(x.tree_))
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
avl_multiset_impl& operator=(BOOST_RV_REF(avl_multiset_impl) x)
|
||||
{ tree_ = ::boost::move(x.tree_); return *this; }
|
||||
|
||||
@ -1553,7 +1553,7 @@ class avl_multiset_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -160,7 +160,7 @@ class avltree_impl
|
||||
{}
|
||||
node_plus_pred_t node_plus_pred_;
|
||||
} data_;
|
||||
|
||||
|
||||
const value_compare &priv_comp() const
|
||||
{ return data_.node_plus_pred_.get(); }
|
||||
|
||||
@ -213,7 +213,7 @@ class avltree_impl
|
||||
typedef typename node_algorithms::insert_commit_data insert_commit_data;
|
||||
|
||||
//! <b>Effects</b>: Constructs an empty tree.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -222,8 +222,8 @@ class avltree_impl
|
||||
avltree_impl( const value_compare &cmp = value_compare()
|
||||
, const value_traits &v_traits = value_traits())
|
||||
: data_(cmp, v_traits)
|
||||
{
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
{
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
this->priv_size_traits().set_size(size_type(0));
|
||||
}
|
||||
|
||||
@ -254,17 +254,17 @@ class avltree_impl
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
avltree_impl(BOOST_RV_REF(avltree_impl) x)
|
||||
: data_(::boost::move(x.priv_comp()), ::boost::move(x.priv_value_traits()))
|
||||
{
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
this->priv_size_traits().set_size(size_type(0));
|
||||
this->swap(x);
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
avltree_impl& operator=(BOOST_RV_REF(avltree_impl) x)
|
||||
{ this->swap(x); return *this; }
|
||||
|
||||
@ -689,7 +689,7 @@ class avltree_impl
|
||||
//! If the check is successful, the user can construct the value_type and use
|
||||
//! "insert_commit" to insert the object in constant-time. This can give a total
|
||||
//! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
|
||||
//!
|
||||
//!
|
||||
//! "commit_data" remains valid for a subsequent "insert_commit" only if no more
|
||||
//! objects are inserted or erased from the container.
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
@ -1238,7 +1238,7 @@ class avltree_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Daniel K. O. 2005.
|
||||
// (C) Copyright Ion Gaztanaga 2007.
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -88,7 +88,7 @@ class avltree_algorithms
|
||||
avltree_node_cloner(F f)
|
||||
: base_t(f)
|
||||
{}
|
||||
|
||||
|
||||
node_ptr operator()(const node_ptr &p)
|
||||
{
|
||||
node_ptr n = base_t::get()(p);
|
||||
@ -149,7 +149,7 @@ class avltree_algorithms
|
||||
{
|
||||
if(node1 == node2)
|
||||
return;
|
||||
|
||||
|
||||
node_ptr header1(tree_algorithms::get_header(node1)), header2(tree_algorithms::get_header(node2));
|
||||
swap_nodes(node1, header1, node2, header2);
|
||||
}
|
||||
@ -364,7 +364,7 @@ class avltree_algorithms
|
||||
//! <b>Effects</b>: First empties target tree calling
|
||||
//! <tt>void disposer::operator()(const 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
|
||||
//! the nodes of the target tree. If "cloner" throws, the cloned target nodes
|
||||
@ -511,7 +511,7 @@ class avltree_algorithms
|
||||
//! ordering compatible with the strict weak ordering used to create the
|
||||
//! the tree. NodePtrCompare compares two node_ptrs. "hint" is node from
|
||||
//! the "header"'s tree.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree, using "hint" as a hint to
|
||||
//! where it will be inserted. If "hint" is the upper_bound
|
||||
//! the insertion takes constant time (two comparisons in the worst case).
|
||||
@ -534,7 +534,7 @@ class avltree_algorithms
|
||||
//! "pos" must be an iterator pointing to the successor to "new_node"
|
||||
//! once inserted according to the order of already inserted nodes. This function does not
|
||||
//! check "pos" and this precondition must be guaranteed by the caller.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree before "pos".
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant-time.
|
||||
@ -554,7 +554,7 @@ class avltree_algorithms
|
||||
//! <b>Requires</b>: "header" must be the header node of a tree.
|
||||
//! "new_node" must be, according to the used ordering no less than the
|
||||
//! greatest inserted key.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree before "pos".
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant-time.
|
||||
@ -573,7 +573,7 @@ class avltree_algorithms
|
||||
//! <b>Requires</b>: "header" must be the header node of a tree.
|
||||
//! "new_node" must be, according to the used ordering, no greater than the
|
||||
//! lowest inserted key.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree before "pos".
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant-time.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -73,7 +73,7 @@ class circular_list_algorithms
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static bool inited(const const_node_ptr &this_node)
|
||||
static bool inited(const const_node_ptr &this_node)
|
||||
{ return !NodeTraits::get_next(this_node); }
|
||||
|
||||
//! <b>Effects</b>: Constructs an empty list, making this_node the only
|
||||
@ -354,7 +354,7 @@ class circular_list_algorithms
|
||||
{
|
||||
node_ptr f(NodeTraits::get_next(p));
|
||||
node_ptr i(NodeTraits::get_next(f)), e(p);
|
||||
|
||||
|
||||
while(i != e) {
|
||||
node_ptr n = i;
|
||||
i = NodeTraits::get_next(i);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -382,7 +382,7 @@ class circular_slist_algorithms
|
||||
std::size_t new_before_last_pos = (distance - (n % distance))% distance;
|
||||
//If the shift is a multiple of the size there is nothing to do
|
||||
if(!new_before_last_pos) return node_ptr();
|
||||
|
||||
|
||||
for( new_last = p
|
||||
; new_before_last_pos--
|
||||
; new_last = node_traits::get_next(new_last)){
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -100,10 +100,10 @@ struct any_unordered_node_traits
|
||||
{ n->node_ptr_2 = prev; }
|
||||
|
||||
static std::size_t get_hash(const const_node_ptr & n)
|
||||
{ return n->size_t_1; }
|
||||
{ return n->size_t_1; }
|
||||
|
||||
static void set_hash(const node_ptr & n, std::size_t h)
|
||||
{ n->size_t_1 = h; }
|
||||
{ n->size_t_1 = h; }
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007.
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
//////} // ///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2008-2012. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -44,11 +44,11 @@ class common_slist_algorithms
|
||||
return p;
|
||||
}
|
||||
|
||||
static void init_header(const node_ptr & this_node)
|
||||
{ NodeTraits::set_next(this_node, this_node); }
|
||||
static void init_header(const node_ptr & this_node)
|
||||
{ NodeTraits::set_next(this_node, this_node); }
|
||||
|
||||
static void init(const node_ptr & this_node)
|
||||
{ NodeTraits::set_next(this_node, node_ptr()); }
|
||||
static void init(const node_ptr & this_node)
|
||||
{ NodeTraits::set_next(this_node, node_ptr()); }
|
||||
|
||||
static bool unique(const const_node_ptr & this_node)
|
||||
{
|
||||
@ -56,7 +56,7 @@ class common_slist_algorithms
|
||||
return !next || next == this_node;
|
||||
}
|
||||
|
||||
static bool inited(const const_node_ptr & this_node)
|
||||
static bool inited(const const_node_ptr & this_node)
|
||||
{ return !NodeTraits::get_next(this_node); }
|
||||
|
||||
static void unlink_after(const node_ptr & prev_node)
|
||||
@ -80,7 +80,7 @@ class common_slist_algorithms
|
||||
NodeTraits::set_next(bp, b);
|
||||
NodeTraits::set_next(be, p);
|
||||
}
|
||||
|
||||
|
||||
static void transfer_after(const node_ptr & bp, const node_ptr & bb, const node_ptr & be)
|
||||
{
|
||||
if (bp != bb && bp != be && bb != be) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Joaquin M Lopez Munoz 2006-2009
|
||||
// (C) Copyright Joaquin M Lopez Munoz 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2009-2009.
|
||||
// (C) Copyright Ion Gaztanaga 2009-2012.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2011-2011. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2011-2012. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
@ -158,7 +158,7 @@
|
||||
|
||||
template <class U>
|
||||
static boost_intrusive_has_member_function_callable_with::no_type Test(...);
|
||||
|
||||
|
||||
static const bool value = sizeof(Test< Fun >(0))
|
||||
== sizeof(boost_intrusive_has_member_function_callable_with::yes_type);
|
||||
};
|
||||
@ -224,7 +224,7 @@
|
||||
|
||||
template <class U>
|
||||
static boost_intrusive_has_member_function_callable_with::no_type Test(...);
|
||||
|
||||
|
||||
static const bool value = sizeof(Test< Fun >(0))
|
||||
== sizeof(boost_intrusive_has_member_function_callable_with::yes_type);
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -182,7 +182,7 @@ class hashtable_iterator
|
||||
public:
|
||||
hashtable_iterator& operator++()
|
||||
{ this->increment(); return *this; }
|
||||
|
||||
|
||||
hashtable_iterator operator++(int)
|
||||
{
|
||||
hashtable_iterator result (*this);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2009-2009.
|
||||
// (C) Copyright Ion Gaztanaga 2009-2012.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -110,7 +110,7 @@ class list_iterator
|
||||
//members_.nodeptr_ = node_traits::get_next(members_.nodeptr_);
|
||||
return static_cast<list_iterator&> (*this);
|
||||
}
|
||||
|
||||
|
||||
list_iterator operator++(int)
|
||||
{
|
||||
list_iterator result (*this);
|
||||
@ -123,7 +123,7 @@ class list_iterator
|
||||
members_.nodeptr_ = node_traits::get_previous(members_.nodeptr_);
|
||||
return static_cast<list_iterator&> (*this);
|
||||
}
|
||||
|
||||
|
||||
list_iterator operator--(int)
|
||||
{
|
||||
list_iterator result (*this);
|
||||
|
@ -6,7 +6,7 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2011-2011. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2011-2012. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -31,16 +31,28 @@ inline std::ptrdiff_t offset_from_pointer_to_member(const Member Parent::* ptr_t
|
||||
//The implementation of a pointer to member is compiler dependent.
|
||||
#if defined(BOOST_INTRUSIVE_MSVC_COMPLIANT_PTR_TO_MEMBER)
|
||||
//msvc compliant compilers use their the first 32 bits as offset (even in 64 bit mode)
|
||||
return *(const boost::int32_t*)(void*)&ptr_to_member;
|
||||
union caster_union
|
||||
{
|
||||
const Member Parent::* ptr_to_member;
|
||||
boost::int32_t offset;
|
||||
} caster;
|
||||
caster.ptr_to_member = ptr_to_member;
|
||||
return std::ptrdiff_t(caster.offset);
|
||||
//This works with gcc, msvc, ac++, ibmcpp
|
||||
#elif defined(__GNUC__) || defined(__HP_aCC) || defined(BOOST_INTEL) || \
|
||||
defined(__IBMCPP__) || defined(__DECCXX)
|
||||
const Parent * const parent = 0;
|
||||
const char *const member = reinterpret_cast<const char*>(&(parent->*ptr_to_member));
|
||||
return std::ptrdiff_t(member - reinterpret_cast<const char*>(parent));
|
||||
const char *const member = static_cast<const char*>(static_cast<const void*>(&(parent->*ptr_to_member)));
|
||||
return std::ptrdiff_t(member - static_cast<const char*>(static_cast<const void*>(parent)));
|
||||
#else
|
||||
//This is the traditional C-front approach: __MWERKS__, __DMC__, __SUNPRO_CC
|
||||
return (*(const std::ptrdiff_t*)(void*)&ptr_to_member) - 1;
|
||||
union caster_union
|
||||
{
|
||||
const Member Parent::* ptr_to_member;
|
||||
std::ptrdiff_t offset;
|
||||
} caster;
|
||||
caster.ptr_to_member = ptr_to_member;
|
||||
return caster.offset - 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2008-2011. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2008-2012. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -43,10 +43,10 @@ struct slist_node_traits
|
||||
<VoidPointer>::template rebind_pointer<const node>::type const_node_ptr;
|
||||
|
||||
static const node_ptr &get_next(const const_node_ptr & n)
|
||||
{ return n->next_; }
|
||||
{ return n->next_; }
|
||||
|
||||
static void set_next(const node_ptr & n, const node_ptr & next)
|
||||
{ n->next_ = next; }
|
||||
{ n->next_ = next; }
|
||||
};
|
||||
|
||||
// slist_iterator provides some basic functions for a
|
||||
@ -100,7 +100,7 @@ class slist_iterator
|
||||
members_.nodeptr_ = node_traits::get_next(members_.nodeptr_);
|
||||
return static_cast<slist_iterator&> (*this);
|
||||
}
|
||||
|
||||
|
||||
slist_iterator operator++(int)
|
||||
{
|
||||
slist_iterator result (*this);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007.
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -192,7 +192,7 @@ class tree_algorithms
|
||||
{
|
||||
if(node1 == node2)
|
||||
return;
|
||||
|
||||
|
||||
node_ptr header1(get_header(node1)), header2(get_header(node2));
|
||||
swap_nodes(node1, header1, node2, header2);
|
||||
}
|
||||
@ -216,7 +216,7 @@ class tree_algorithms
|
||||
{
|
||||
if(node1 == node2)
|
||||
return;
|
||||
|
||||
|
||||
//node1 and node2 must not be header nodes
|
||||
//BOOST_INTRUSIVE_INVARIANT_ASSERT((header1 != node1 && header2 != node2));
|
||||
if(header1 != header2){
|
||||
@ -388,7 +388,7 @@ class tree_algorithms
|
||||
{
|
||||
if(node_to_be_replaced == new_node)
|
||||
return;
|
||||
|
||||
|
||||
//Update header if necessary
|
||||
if(node_to_be_replaced == NodeTraits::get_left(header)){
|
||||
NodeTraits::set_left(header, new_node);
|
||||
@ -688,7 +688,7 @@ class tree_algorithms
|
||||
{
|
||||
if(header1 == header2)
|
||||
return;
|
||||
|
||||
|
||||
node_ptr tmp;
|
||||
|
||||
//Parent swap
|
||||
@ -1174,7 +1174,7 @@ class tree_algorithms
|
||||
//! <b>Effects</b>: First empties target tree calling
|
||||
//! <tt>void disposer::operator()(const 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
|
||||
//! the nodes of the target tree. If "cloner" throws, the cloned target nodes
|
||||
@ -1536,7 +1536,7 @@ class tree_algorithms
|
||||
//Put old_root as right child
|
||||
NodeTraits::set_right(super_root, old_root);
|
||||
|
||||
//Start the compression algorithm
|
||||
//Start the compression algorithm
|
||||
node_ptr even_parent = super_root;
|
||||
node_ptr new_root = old_root;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007.
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -119,7 +119,7 @@ class tree_iterator
|
||||
members_.nodeptr_ = node_algorithms::next_node(members_.nodeptr_);
|
||||
return static_cast<tree_iterator&> (*this);
|
||||
}
|
||||
|
||||
|
||||
tree_iterator operator++(int)
|
||||
{
|
||||
tree_iterator result (*this);
|
||||
@ -132,7 +132,7 @@ class tree_iterator
|
||||
members_.nodeptr_ = node_algorithms::prev_node(members_.nodeptr_);
|
||||
return static_cast<tree_iterator&> (*this);
|
||||
}
|
||||
|
||||
|
||||
tree_iterator operator--(int)
|
||||
{
|
||||
tree_iterator result (*this);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -200,7 +200,7 @@ struct key_nodeptr_comp
|
||||
key_nodeptr_comp(KeyValueCompare kcomp, const Container *cont)
|
||||
: base_t(kcomp), cont_(cont)
|
||||
{}
|
||||
|
||||
|
||||
template<class T>
|
||||
struct is_node_ptr
|
||||
{
|
||||
@ -504,7 +504,7 @@ inline std::size_t floor_log2 (std::size_t x)
|
||||
|
||||
std::size_t n = x;
|
||||
std::size_t log2 = 0;
|
||||
|
||||
|
||||
for(std::size_t shift = Bits >> 1; shift; shift >>= 1){
|
||||
std::size_t tmp = n >> shift;
|
||||
if (tmp)
|
||||
|
@ -1,6 +1,6 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2009. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -490,7 +490,7 @@ struct group_functions
|
||||
//itself, as group list does not link bucket
|
||||
node_ptr prev_in_group(group_traits::get_next(elem));
|
||||
bool first_in_group = node_traits::get_next(prev_in_group) != elem;
|
||||
|
||||
|
||||
if(first_in_group){
|
||||
node_ptr start_pos;
|
||||
if(last_in_group){
|
||||
@ -810,7 +810,7 @@ class hashtable_impl
|
||||
node_cast_adaptor(const ConvertibleToF &c2f, const hashtable_impl *cont)
|
||||
: base_t(base_t(c2f, cont))
|
||||
{}
|
||||
|
||||
|
||||
typename base_t::node_ptr operator()(const typename slist_impl::node &to_clone)
|
||||
{ return base_t::operator()(static_cast<const node &>(to_clone)); }
|
||||
|
||||
@ -879,7 +879,7 @@ class hashtable_impl
|
||||
//!
|
||||
//! <b>Effects</b>: Constructs an empty unordered_set, storing a reference
|
||||
//! to the bucket array and copies of the key_hasher and equal_func functors.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -905,7 +905,7 @@ class hashtable_impl
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
hashtable_impl(BOOST_RV_REF(hashtable_impl) x)
|
||||
: data_( ::boost::move(x.priv_bucket_traits())
|
||||
, ::boost::move(x.priv_hasher())
|
||||
@ -927,7 +927,7 @@ class hashtable_impl
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
hashtable_impl& operator=(BOOST_RV_REF(hashtable_impl) x)
|
||||
{ this->swap(x); return *this; }
|
||||
|
||||
@ -1131,7 +1131,7 @@ class hashtable_impl
|
||||
typedef node_cast_adaptor<detail::node_disposer<Disposer, hashtable_impl> > NodeDisposer;
|
||||
typedef node_cast_adaptor<detail::node_cloner<Cloner, hashtable_impl> > NodeCloner;
|
||||
NodeDisposer node_disp(disposer, this);
|
||||
|
||||
|
||||
detail::exception_array_disposer<bucket_type, NodeDisposer, size_type>
|
||||
rollback(dst_buckets[0], node_disp, constructed);
|
||||
for( constructed = 0
|
||||
@ -1839,7 +1839,7 @@ class hashtable_impl
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!stateful_value_traits));
|
||||
siterator sit = bucket_type::s_iterator_to(((hashtable_impl*)0)->priv_value_to_node(value));
|
||||
return local_iterator(sit, (hashtable_impl*)0);
|
||||
return local_iterator(sit, (hashtable_impl*)0);
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
|
||||
@ -1858,7 +1858,7 @@ class hashtable_impl
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!stateful_value_traits));
|
||||
siterator sit = bucket_type::s_iterator_to(((hashtable_impl*)0)->priv_value_to_node(const_cast<value_type&>(value)));
|
||||
return const_local_iterator(sit, (hashtable_impl*)0);
|
||||
return const_local_iterator(sit, (hashtable_impl*)0);
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
|
||||
@ -1873,7 +1873,7 @@ class hashtable_impl
|
||||
local_iterator local_iterator_to(reference value)
|
||||
{
|
||||
siterator sit = bucket_type::s_iterator_to(this->priv_value_to_node(value));
|
||||
return local_iterator(sit, this);
|
||||
return local_iterator(sit, this);
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
|
||||
@ -1889,7 +1889,7 @@ class hashtable_impl
|
||||
{
|
||||
siterator sit = bucket_type::s_iterator_to
|
||||
(const_cast<node &>(this->priv_value_to_node(value)));
|
||||
return const_local_iterator(sit, this);
|
||||
return const_local_iterator(sit, this);
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: Returns the number of buckets passed in the constructor
|
||||
@ -2058,7 +2058,7 @@ class hashtable_impl
|
||||
bucket_ptr old_buckets = this->priv_buckets();
|
||||
size_type old_buckets_len = this->priv_buckets_len();
|
||||
|
||||
//Check power of two bucket array if the option is activated
|
||||
//Check power of two bucket array if the option is activated
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT
|
||||
(!power_2_buckets || (0 == (new_buckets_len & (new_buckets_len-1u))));
|
||||
|
||||
@ -2220,7 +2220,7 @@ class hashtable_impl
|
||||
//!
|
||||
//! Otherwise, copy assigns new_bucket_traits to the internal bucket_traits
|
||||
//! and transfers all the objects from old buckets to the new ones.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to size().
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing
|
||||
@ -2613,7 +2613,7 @@ class hashtable_impl
|
||||
bool last_in_group = (first_end_ptr <= nxt && nxt <= last_end_ptr) ||
|
||||
(group_traits::get_next(nxt) != elem);
|
||||
bool first_in_group = node_traits::get_next(prev_in_group) != elem;
|
||||
|
||||
|
||||
if(first_in_group){
|
||||
node_ptr start_pos;
|
||||
if(last_in_group){
|
||||
@ -2720,7 +2720,7 @@ class hashtable_impl
|
||||
const real_bucket_traits &rbt = this->priv_real_bucket_traits();
|
||||
return rbt.bucket_begin() + rbt.bucket_count();
|
||||
}
|
||||
|
||||
|
||||
siterator priv_invalid_local_it() const
|
||||
{ return priv_invalid_bucket()->end(); }
|
||||
|
||||
@ -2887,7 +2887,7 @@ class hashtable_impl
|
||||
if(constant_time_size && this->empty()){
|
||||
return priv_invalid_local_it();
|
||||
}
|
||||
|
||||
|
||||
siterator it = previt;
|
||||
++it;
|
||||
|
||||
@ -3008,7 +3008,7 @@ class hashtable_impl
|
||||
++count;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//If we reached the end, find the first, non-empty bucket
|
||||
for(bucket_number_second = bucket_number_first+1
|
||||
; bucket_number_second != this->priv_buckets_len()
|
||||
@ -3061,7 +3061,7 @@ struct make_hashtable_opt
|
||||
, detail::eval_value_traits<value_traits>
|
||||
, detail::identity<value_traits>
|
||||
>::type real_value_traits;
|
||||
typedef typename packed_options::bucket_traits specified_bucket_traits;
|
||||
typedef typename packed_options::bucket_traits specified_bucket_traits;
|
||||
|
||||
//Real bucket traits must be calculated from options and calculated value_traits
|
||||
typedef typename detail::get_slist_impl
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -255,7 +255,7 @@ class linear_slist_algorithms
|
||||
if(!end_found){
|
||||
old_last = base_t::get_previous_node(first, node_ptr());
|
||||
}
|
||||
|
||||
|
||||
//Now link p after the new last node
|
||||
NodeTraits::set_next(old_last, p);
|
||||
NodeTraits::set_next(new_last, node_ptr());
|
||||
@ -300,7 +300,7 @@ class linear_slist_algorithms
|
||||
//If the shift is a multiple of the size there is nothing to do
|
||||
if(!new_before_last_pos)
|
||||
return ret;
|
||||
|
||||
|
||||
for( new_last = p
|
||||
; --new_before_last_pos
|
||||
; new_last = node_traits::get_next(new_last)){
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -204,16 +204,16 @@ class list_impl
|
||||
//! constructor throws (this does not happen with predefined Boost.Intrusive hooks).
|
||||
list_impl(const value_traits &v_traits = value_traits())
|
||||
: data_(v_traits)
|
||||
{
|
||||
{
|
||||
this->priv_size_traits().set_size(size_type(0));
|
||||
node_algorithms::init_header(this->get_root_node());
|
||||
node_algorithms::init_header(this->get_root_node());
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: Dereferencing iterator must yield an lvalue of type value_type.
|
||||
//!
|
||||
//! <b>Effects</b>: Constructs a list equal to the range [first,last).
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear in std::distance(b, e). No copy constructors are called.
|
||||
//! <b>Complexity</b>: Linear in std::distance(b, e). No copy constructors are called.
|
||||
//!
|
||||
//! <b>Throws</b>: If real_value_traits::node_traits::node
|
||||
//! constructor throws (this does not happen with predefined Boost.Intrusive hooks).
|
||||
@ -227,17 +227,17 @@ class list_impl
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
list_impl(BOOST_RV_REF(list_impl) x)
|
||||
: data_(::boost::move(x.priv_value_traits()))
|
||||
{
|
||||
this->priv_size_traits().set_size(size_type(0));
|
||||
node_algorithms::init_header(this->get_root_node());
|
||||
node_algorithms::init_header(this->get_root_node());
|
||||
this->swap(x);
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
list_impl& operator=(BOOST_RV_REF(list_impl) x)
|
||||
{ this->swap(x); return *this; }
|
||||
|
||||
@ -470,7 +470,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
reverse_iterator rend()
|
||||
reverse_iterator rend()
|
||||
{ return reverse_iterator(begin()); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
@ -479,7 +479,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reverse_iterator rend() const
|
||||
const_reverse_iterator rend() const
|
||||
{ return this->crend(); }
|
||||
|
||||
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
||||
@ -488,7 +488,7 @@ class list_impl
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
const_reverse_iterator crend() const
|
||||
const_reverse_iterator crend() const
|
||||
{ return const_reverse_iterator(this->begin()); }
|
||||
|
||||
//! <b>Precondition</b>: end_iterator must be a valid end iterator
|
||||
@ -771,7 +771,7 @@ class list_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws. Basic guarantee.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2010-2010
|
||||
// (C) Copyright Ion Gaztanaga 2010-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -6,7 +6,7 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2011-2011. Distributed under the Boost
|
||||
// (C) Copyright Ion Gaztanaga 2011-2012. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
@ -232,7 +232,7 @@ struct pointer_traits<T*>
|
||||
|
||||
template <class U> struct rebind_pointer
|
||||
{ typedef U* type; };
|
||||
|
||||
|
||||
//! <b>Returns</b>: addressof(r)
|
||||
//!
|
||||
static pointer pointer_to(reference r)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -218,7 +218,7 @@ class rbtree_impl
|
||||
typedef typename node_algorithms::insert_commit_data insert_commit_data;
|
||||
|
||||
//! <b>Effects</b>: Constructs an empty tree.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -227,8 +227,8 @@ class rbtree_impl
|
||||
rbtree_impl( const value_compare &cmp = value_compare()
|
||||
, const value_traits &v_traits = value_traits())
|
||||
: data_(cmp, v_traits)
|
||||
{
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
{
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
this->priv_size_traits().set_size(size_type(0));
|
||||
}
|
||||
|
||||
@ -259,17 +259,17 @@ class rbtree_impl
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
rbtree_impl(BOOST_RV_REF(rbtree_impl) x)
|
||||
: data_(::boost::move(x.priv_comp()), ::boost::move(x.priv_value_traits()))
|
||||
{
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
this->priv_size_traits().set_size(size_type(0));
|
||||
this->swap(x);
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
rbtree_impl& operator=(BOOST_RV_REF(rbtree_impl) x)
|
||||
{ this->swap(x); return *this; }
|
||||
|
||||
@ -694,7 +694,7 @@ class rbtree_impl
|
||||
//! If the check is successful, the user can construct the value_type and use
|
||||
//! "insert_commit" to insert the object in constant-time. This can give a total
|
||||
//! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
|
||||
//!
|
||||
//!
|
||||
//! "commit_data" remains valid for a subsequent "insert_commit" only if no more
|
||||
//! objects are inserted or erased from the container.
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
@ -1242,7 +1242,7 @@ class rbtree_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -135,7 +135,7 @@ class rbtree_algorithms
|
||||
rbtree_node_cloner(F f)
|
||||
: base_t(f)
|
||||
{}
|
||||
|
||||
|
||||
node_ptr operator()(const node_ptr & p)
|
||||
{
|
||||
node_ptr n = base_t::get()(p);
|
||||
@ -201,7 +201,7 @@ class rbtree_algorithms
|
||||
{
|
||||
if(node1 == node2)
|
||||
return;
|
||||
|
||||
|
||||
node_ptr header1(tree_algorithms::get_header(node1)), header2(tree_algorithms::get_header(node2));
|
||||
swap_nodes(node1, header1, node2, header2);
|
||||
}
|
||||
@ -418,7 +418,7 @@ class rbtree_algorithms
|
||||
//! <b>Effects</b>: First empties target tree calling
|
||||
//! <tt>void disposer::operator()(const 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
|
||||
//! the nodes of the target tree. If "cloner" throws, the cloned target nodes
|
||||
@ -565,7 +565,7 @@ class rbtree_algorithms
|
||||
//! ordering compatible with the strict weak ordering used to create the
|
||||
//! the tree. NodePtrCompare compares two node_ptrs. "hint" is node from
|
||||
//! the "header"'s tree.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree, using "hint" as a hint to
|
||||
//! where it will be inserted. If "hint" is the upper_bound
|
||||
//! the insertion takes constant time (two comparisons in the worst case).
|
||||
@ -588,7 +588,7 @@ class rbtree_algorithms
|
||||
//! "pos" must be an iterator pointing to the successor to "new_node"
|
||||
//! once inserted according to the order of already inserted nodes. This function does not
|
||||
//! check "pos" and this precondition must be guaranteed by the caller.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree before "pos".
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant-time.
|
||||
@ -608,7 +608,7 @@ class rbtree_algorithms
|
||||
//! <b>Requires</b>: "header" must be the header node of a tree.
|
||||
//! "new_node" must be, according to the used ordering no less than the
|
||||
//! greatest inserted key.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree before "pos".
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant-time.
|
||||
@ -627,7 +627,7 @@ class rbtree_algorithms
|
||||
//! <b>Requires</b>: "header" must be the header node of a tree.
|
||||
//! "new_node" must be, according to the used ordering, no greater than the
|
||||
//! lowest inserted key.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree before "pos".
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant-time.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -87,7 +87,7 @@ class set_impl
|
||||
|
||||
public:
|
||||
//! <b>Effects</b>: Constructs an empty set.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -118,13 +118,13 @@ class set_impl
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
set_impl(BOOST_RV_REF(set_impl) x)
|
||||
: tree_(::boost::move(x.tree_))
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
set_impl& operator=(BOOST_RV_REF(set_impl) x)
|
||||
{ tree_ = ::boost::move(x.tree_); return *this; }
|
||||
|
||||
@ -350,7 +350,7 @@ class set_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
|
||||
@ -460,7 +460,7 @@ class set_impl
|
||||
//! If the check is successful, the user can construct the value_type and use
|
||||
//! "insert_commit" to insert the object in constant-time. This can give a total
|
||||
//! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
|
||||
//!
|
||||
//!
|
||||
//! "commit_data" remains valid for a subsequent "insert_commit" only if no more
|
||||
//! objects are inserted or erased from the set.
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
@ -1303,7 +1303,7 @@ class multiset_impl
|
||||
|
||||
public:
|
||||
//! <b>Effects</b>: Constructs an empty multiset.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -1334,13 +1334,13 @@ class multiset_impl
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
multiset_impl(BOOST_RV_REF(multiset_impl) x)
|
||||
: tree_(::boost::move(x.tree_))
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
multiset_impl& operator=(BOOST_RV_REF(multiset_impl) x)
|
||||
{ tree_ = ::boost::move(x.tree_); return *this; }
|
||||
|
||||
@ -1566,7 +1566,7 @@ class multiset_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
|
||||
@ -2330,7 +2330,7 @@ class multiset
|
||||
Options...
|
||||
#endif
|
||||
>::type Base;
|
||||
|
||||
|
||||
BOOST_MOVABLE_BUT_NOT_COPYABLE(multiset)
|
||||
|
||||
public:
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -78,7 +78,7 @@ class sg_set_impl
|
||||
|
||||
public:
|
||||
//! <b>Effects</b>: Constructs an empty sg_set.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -109,13 +109,13 @@ class sg_set_impl
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
sg_set_impl(BOOST_RV_REF(sg_set_impl) x)
|
||||
: tree_(::boost::move(x.tree_))
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
sg_set_impl& operator=(BOOST_RV_REF(sg_set_impl) x)
|
||||
{ tree_ = ::boost::move(x.tree_); return *this; }
|
||||
|
||||
@ -341,7 +341,7 @@ class sg_set_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
|
||||
@ -451,7 +451,7 @@ class sg_set_impl
|
||||
//! If the check is successful, the user can construct the value_type and use
|
||||
//! "insert_commit" to insert the object in constant-time. This can give a total
|
||||
//! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
|
||||
//!
|
||||
//!
|
||||
//! "commit_data" remains valid for a subsequent "insert_commit" only if no more
|
||||
//! objects are inserted or erased from the sg_set.
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
@ -1326,7 +1326,7 @@ class sg_multiset_impl
|
||||
|
||||
public:
|
||||
//! <b>Effects</b>: Constructs an empty sg_multiset.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -1357,13 +1357,13 @@ class sg_multiset_impl
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
sg_multiset_impl(BOOST_RV_REF(sg_multiset_impl) x)
|
||||
: tree_(::boost::move(x.tree_))
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
sg_multiset_impl& operator=(BOOST_RV_REF(sg_multiset_impl) x)
|
||||
{ tree_ = ::boost::move(x.tree_); return *this; }
|
||||
|
||||
@ -1589,7 +1589,7 @@ class sg_multiset_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -103,7 +103,7 @@ struct alpha_by_max_size_t
|
||||
alpha_by_max_size_t(float alpha)
|
||||
: alpha_(alpha)
|
||||
{}
|
||||
|
||||
|
||||
float operator()(std::size_t max_tree_size) const
|
||||
{ return float(max_tree_size)*alpha_; }
|
||||
|
||||
@ -299,7 +299,7 @@ class sgtree_impl
|
||||
|
||||
void priv_alpha(float alpha)
|
||||
{ return this->priv_alpha_traits().set_alpha(alpha); }
|
||||
|
||||
|
||||
const value_compare &priv_comp() const
|
||||
{ return data_.node_plus_pred_.get(); }
|
||||
|
||||
@ -364,7 +364,7 @@ class sgtree_impl
|
||||
typedef typename node_algorithms::insert_commit_data insert_commit_data;
|
||||
|
||||
//! <b>Effects</b>: Constructs an empty tree.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -373,8 +373,8 @@ class sgtree_impl
|
||||
sgtree_impl( const value_compare &cmp = value_compare()
|
||||
, const value_traits &v_traits = value_traits())
|
||||
: data_(cmp, v_traits)
|
||||
{
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
{
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
this->priv_size_traits().set_size(size_type(0));
|
||||
}
|
||||
|
||||
@ -405,17 +405,17 @@ class sgtree_impl
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
sgtree_impl(BOOST_RV_REF(sgtree_impl) x)
|
||||
: data_(::boost::move(x.priv_comp()), ::boost::move(x.priv_value_traits()))
|
||||
{
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
this->priv_size_traits().set_size(size_type(0));
|
||||
this->swap(x);
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
sgtree_impl& operator=(BOOST_RV_REF(sgtree_impl) x)
|
||||
{ this->swap(x); return *this; }
|
||||
|
||||
@ -848,7 +848,7 @@ class sgtree_impl
|
||||
//! If the check is successful, the user can construct the value_type and use
|
||||
//! "insert_commit" to insert the object in constant-time. This can give a total
|
||||
//! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
|
||||
//!
|
||||
//!
|
||||
//! "commit_data" remains valid for a subsequent "insert_commit" only if no more
|
||||
//! objects are inserted or erased from the container.
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
@ -1040,7 +1040,7 @@ class sgtree_impl
|
||||
//! <b>Note</b>: Invalidates the iterators (but not the references)
|
||||
//! to the erased elements. No destructors are called.
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
size_type erase(const KeyType& key, KeyValueCompare comp
|
||||
size_type erase(const KeyType& key, KeyValueCompare comp
|
||||
/// @cond
|
||||
, typename detail::enable_if_c<!detail::is_convertible<KeyValueCompare, const_iterator>::value >::type * = 0
|
||||
/// @endcond
|
||||
@ -1414,7 +1414,7 @@ class sgtree_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007.
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -119,7 +119,7 @@ class sgtree_algorithms
|
||||
{
|
||||
if(node1 == node2)
|
||||
return;
|
||||
|
||||
|
||||
node_ptr header1(tree_algorithms::get_header(node1)), header2(tree_algorithms::get_header(node2));
|
||||
swap_nodes(node1, header1, node2, header2);
|
||||
}
|
||||
@ -322,7 +322,7 @@ class sgtree_algorithms
|
||||
//! <b>Effects</b>: First empties target tree calling
|
||||
//! <tt>void disposer::operator()(const 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
|
||||
//! the nodes of the target tree. If "cloner" throws, the cloned target nodes
|
||||
@ -472,7 +472,7 @@ class sgtree_algorithms
|
||||
//! ordering compatible with the strict weak ordering used to create the
|
||||
//! the tree. NodePtrCompare compares two node_ptrs. "hint" is node from
|
||||
//! the "header"'s tree.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree, using "hint" as a hint to
|
||||
//! where it will be inserted. If "hint" is the upper_bound
|
||||
//! the insertion takes constant time (two comparisons in the worst case).
|
||||
@ -544,7 +544,7 @@ class sgtree_algorithms
|
||||
//! "pos" must be an iterator pointing to the successor to "new_node"
|
||||
//! once inserted according to the order of already inserted nodes. This function does not
|
||||
//! check "pos" and this precondition must be guaranteed by the caller.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree before "pos".
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant-time.
|
||||
@ -567,7 +567,7 @@ class sgtree_algorithms
|
||||
//! <b>Requires</b>: "header" must be the header node of a tree.
|
||||
//! "new_node" must be, according to the used ordering no less than the
|
||||
//! greatest inserted key.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree before "pos".
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant-time.
|
||||
@ -589,7 +589,7 @@ class sgtree_algorithms
|
||||
//! <b>Requires</b>: "header" must be the header node of a tree.
|
||||
//! "new_node" must be, according to the used ordering, no greater than the
|
||||
//! lowest inserted key.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree before "pos".
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant-time.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -287,7 +287,7 @@ class slist_impl
|
||||
//!
|
||||
//! <b>Effects</b>: Constructs a list equal to [first,last).
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear in std::distance(b, e). No copy constructors are called.
|
||||
//! <b>Complexity</b>: Linear in std::distance(b, e). No copy constructors are called.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
//! constructor throws (this does not happen with predefined Boost.Intrusive hooks).
|
||||
@ -300,17 +300,17 @@ class slist_impl
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
slist_impl(BOOST_RV_REF(slist_impl) x)
|
||||
: data_(::boost::move(x.priv_value_traits()))
|
||||
{
|
||||
this->priv_size_traits().set_size(size_type(0));
|
||||
node_algorithms::init_header(this->get_root_node());
|
||||
node_algorithms::init_header(this->get_root_node());
|
||||
this->swap(x);
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
slist_impl& operator=(BOOST_RV_REF(slist_impl) x)
|
||||
{ this->swap(x); return *this; }
|
||||
|
||||
@ -700,7 +700,7 @@ class slist_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws.
|
||||
@ -1517,7 +1517,7 @@ class slist_impl
|
||||
void remove_and_dispose_if(Pred pred, Disposer disposer)
|
||||
{
|
||||
const_iterator bcur(this->before_begin()), cur(this->begin()), e(this->end());
|
||||
|
||||
|
||||
while(cur != e){
|
||||
if (pred(*cur)){
|
||||
cur = this->erase_after_and_dispose(bcur, disposer);
|
||||
@ -1837,7 +1837,7 @@ class slist_impl
|
||||
|
||||
void priv_shift_forward(size_type n, detail::bool_<false>)
|
||||
{
|
||||
node_ptr last = node_algorithms::move_backwards(this->get_root_node(), (std::size_t)n);
|
||||
node_ptr last = node_algorithms::move_backwards(this->get_root_node(), (std::size_t)n);
|
||||
if(cache_last && last){
|
||||
this->set_last_node(last);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -80,7 +80,7 @@ class splay_set_impl
|
||||
|
||||
public:
|
||||
//! <b>Effects</b>: Constructs an empty splay_set.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -111,13 +111,13 @@ class splay_set_impl
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
splay_set_impl(BOOST_RV_REF(splay_set_impl) x)
|
||||
: tree_(::boost::move(x.tree_))
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
splay_set_impl& operator=(BOOST_RV_REF(splay_set_impl) x)
|
||||
{ tree_ = ::boost::move(x.tree_); return *this; }
|
||||
|
||||
@ -343,7 +343,7 @@ class splay_set_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
|
||||
@ -452,7 +452,7 @@ class splay_set_impl
|
||||
//! If the check is successful, the user can construct the value_type and use
|
||||
//! "insert_commit" to insert the object in constant-time. This can give a total
|
||||
//! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
|
||||
//!
|
||||
//!
|
||||
//! "commit_data" remains valid for a subsequent "insert_commit" only if no more
|
||||
//! objects are inserted or erased from the splay_set.
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
@ -1312,7 +1312,7 @@ class splay_multiset_impl
|
||||
|
||||
public:
|
||||
//! <b>Effects</b>: Constructs an empty splay_multiset.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -1343,13 +1343,13 @@ class splay_multiset_impl
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
splay_multiset_impl(BOOST_RV_REF(splay_multiset_impl) x)
|
||||
: tree_(::boost::move(x.tree_))
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
splay_multiset_impl& operator=(BOOST_RV_REF(splay_multiset_impl) x)
|
||||
{ tree_ = ::boost::move(x.tree_); return *this; }
|
||||
|
||||
@ -1575,7 +1575,7 @@ class splay_multiset_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -155,7 +155,7 @@ class splaytree_impl
|
||||
{}
|
||||
node_plus_pred_t node_plus_pred_;
|
||||
} data_;
|
||||
|
||||
|
||||
const value_compare &priv_comp() const
|
||||
{ return data_.node_plus_pred_.get(); }
|
||||
|
||||
@ -208,7 +208,7 @@ class splaytree_impl
|
||||
typedef typename node_algorithms::insert_commit_data insert_commit_data;
|
||||
|
||||
//! <b>Effects</b>: Constructs an empty tree.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -217,8 +217,8 @@ class splaytree_impl
|
||||
splaytree_impl( const value_compare &cmp = value_compare()
|
||||
, const value_traits &v_traits = value_traits())
|
||||
: data_(cmp, v_traits)
|
||||
{
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
{
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
this->priv_size_traits().set_size(size_type(0));
|
||||
}
|
||||
|
||||
@ -249,17 +249,17 @@ class splaytree_impl
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
splaytree_impl(BOOST_RV_REF(splaytree_impl) x)
|
||||
: data_(::boost::move(x.priv_comp()), ::boost::move(x.priv_value_traits()))
|
||||
{
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
this->priv_size_traits().set_size(size_type(0));
|
||||
this->swap(x);
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
splaytree_impl& operator=(BOOST_RV_REF(splaytree_impl) x)
|
||||
{ this->swap(x); return *this; }
|
||||
|
||||
@ -680,7 +680,7 @@ class splaytree_impl
|
||||
//! If the check is successful, the user can construct the value_type and use
|
||||
//! "insert_commit" to insert the object in constant-time. This can give a total
|
||||
//! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
|
||||
//!
|
||||
//!
|
||||
//! "commit_data" remains valid for a subsequent "insert_commit" only if no more
|
||||
//! objects are inserted or erased from the container.
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
@ -1179,7 +1179,7 @@ class splaytree_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007.
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -16,7 +16,7 @@
|
||||
// Here is the header of the file used as base code:
|
||||
//
|
||||
// splay_tree.h -- implementation of a STL complatible splay tree.
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2004 Ralf Mattethat
|
||||
//
|
||||
// Permission to copy, use, modify, sell and distribute this software
|
||||
@ -24,7 +24,7 @@
|
||||
// This software is provided "as is" without express or implied
|
||||
// warranty, and with no claim as to its suitability for any purpose.
|
||||
//
|
||||
// Please send questions, comments, complaints, performance data, etc to
|
||||
// Please send questions, comments, complaints, performance data, etc to
|
||||
// ralf.mattethat@teknologisk.dk
|
||||
//
|
||||
// Requirements for element type
|
||||
@ -95,7 +95,7 @@ struct splaydown_rollback
|
||||
|
||||
//! A splay tree is an implementation of a binary search tree. The tree is
|
||||
//! self balancing using the splay algorithm as described in
|
||||
//!
|
||||
//!
|
||||
//! "Self-Adjusting Binary Search Trees
|
||||
//! by Daniel Dominic Sleator and Robert Endre Tarjan
|
||||
//! AT&T Bell Laboratories, Murray Hill, NJ
|
||||
@ -190,7 +190,7 @@ class splaytree_algorithms
|
||||
{
|
||||
if(node1 == node2)
|
||||
return;
|
||||
|
||||
|
||||
node_ptr header1(tree_algorithms::get_header(node1)), header2(tree_algorithms::get_header(node2));
|
||||
swap_nodes(node1, header1, node2, header2);
|
||||
}
|
||||
@ -525,7 +525,7 @@ class splaytree_algorithms
|
||||
//! ordering compatible with the strict weak ordering used to create the
|
||||
//! the tree. NodePtrCompare compares two node_ptrs. "hint" is node from
|
||||
//! the "header"'s tree.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree, using "hint" as a hint to
|
||||
//! where it will be inserted. If "hint" is the upper_bound
|
||||
//! the insertion takes constant time (two comparisons in the worst case).
|
||||
@ -548,7 +548,7 @@ class splaytree_algorithms
|
||||
//! "pos" must be an iterator pointing to the successor to "new_node"
|
||||
//! once inserted according to the order of already inserted nodes. This function does not
|
||||
//! check "pos" and this precondition must be guaranteed by the caller.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree before "pos".
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant-time.
|
||||
@ -568,7 +568,7 @@ class splaytree_algorithms
|
||||
//! <b>Requires</b>: "header" must be the header node of a tree.
|
||||
//! "new_node" must be, according to the used ordering no less than the
|
||||
//! greatest inserted key.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree before "pos".
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant-time.
|
||||
@ -587,7 +587,7 @@ class splaytree_algorithms
|
||||
//! <b>Requires</b>: "header" must be the header node of a tree.
|
||||
//! "new_node" must be, according to the used ordering, no greater than the
|
||||
//! lowest inserted key.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree before "pos".
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant-time.
|
||||
@ -650,7 +650,7 @@ class splaytree_algorithms
|
||||
//! <b>Effects</b>: First empties target tree calling
|
||||
//! <tt>void disposer::operator()(const 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
|
||||
//! the nodes of the target tree. If "cloner" throws, the cloned target nodes
|
||||
@ -723,13 +723,13 @@ class splaytree_algorithms
|
||||
node_ptr t(header);
|
||||
|
||||
if( n == t ) return;
|
||||
|
||||
|
||||
for( ;; ){
|
||||
node_ptr p(NodeTraits::get_parent(n));
|
||||
node_ptr g(NodeTraits::get_parent(p));
|
||||
|
||||
if( p == t ) break;
|
||||
|
||||
|
||||
if( g == t ){
|
||||
// zig
|
||||
rotate(n);
|
||||
@ -929,7 +929,7 @@ class splaytree_algorithms
|
||||
//Test if g is header before breaking tree
|
||||
//invariants that would make is_header invalid
|
||||
bool g_is_header = is_header(g);
|
||||
|
||||
|
||||
if(NodeTraits::get_left(p) == n){
|
||||
NodeTraits::set_left(p, NodeTraits::get_right(n));
|
||||
if(NodeTraits::get_left(p) != node_ptr())
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2008
|
||||
// (C) Copyright Ion Gaztanaga 2008-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -167,7 +167,7 @@ class treap_impl
|
||||
{}
|
||||
node_plus_pred_t node_plus_pred_;
|
||||
} data_;
|
||||
|
||||
|
||||
const value_compare &priv_comp() const
|
||||
{ return data_.node_plus_pred_.get(); }
|
||||
|
||||
@ -226,7 +226,7 @@ class treap_impl
|
||||
typedef typename node_algorithms::insert_commit_data insert_commit_data;
|
||||
|
||||
//! <b>Effects</b>: Constructs an empty treap.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -236,8 +236,8 @@ class treap_impl
|
||||
, const priority_compare &pcmp = priority_compare()
|
||||
, const value_traits &v_traits = value_traits())
|
||||
: data_(cmp, pcmp, v_traits)
|
||||
{
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
{
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
this->priv_size_traits().set_size(size_type(0));
|
||||
}
|
||||
|
||||
@ -270,19 +270,19 @@ class treap_impl
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
treap_impl(BOOST_RV_REF(treap_impl) x)
|
||||
: data_( ::boost::move(x.priv_comp())
|
||||
, ::boost::move(x.priv_pcomp())
|
||||
, ::boost::move(x.priv_value_traits()))
|
||||
{
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
node_algorithms::init_header(this->priv_header_ptr());
|
||||
this->priv_size_traits().set_size(size_type(0));
|
||||
this->swap(x);
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
treap_impl& operator=(BOOST_RV_REF(treap_impl) x)
|
||||
{ this->swap(x); return *this; }
|
||||
|
||||
@ -786,7 +786,7 @@ class treap_impl
|
||||
//! If the check is successful, the user can construct the value_type and use
|
||||
//! "insert_commit" to insert the object in constant-time. This can give a total
|
||||
//! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
|
||||
//!
|
||||
//!
|
||||
//! "commit_data" remains valid for a subsequent "insert_commit" only if no more
|
||||
//! objects are inserted or erased from the container.
|
||||
template<class KeyType, class KeyValueCompare, class KeyValuePrioCompare>
|
||||
@ -1349,7 +1349,7 @@ class treap_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -92,7 +92,7 @@ class treap_algorithms
|
||||
tree_algorithms::erase(header_, z_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void release()
|
||||
{ remove_it_ = false; }
|
||||
|
||||
@ -117,7 +117,7 @@ class treap_algorithms
|
||||
rotate_up_n(header_, p_, n_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void release()
|
||||
{ remove_it_ = false; }
|
||||
|
||||
@ -199,7 +199,7 @@ class treap_algorithms
|
||||
{
|
||||
if(node1 == node2)
|
||||
return;
|
||||
|
||||
|
||||
node_ptr header1(tree_algorithms::get_header(node1)), header2(tree_algorithms::get_header(node2));
|
||||
swap_nodes(node1, header1, node2, header2);
|
||||
}
|
||||
@ -400,7 +400,7 @@ class treap_algorithms
|
||||
//! <b>Effects</b>: First empties target tree calling
|
||||
//! <tt>void disposer::operator()(const 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
|
||||
//! the nodes of the target tree. If "cloner" throws, the cloned target nodes
|
||||
@ -557,7 +557,7 @@ class treap_algorithms
|
||||
//! NodePtrPriorityCompare is a priority function object that induces a strict weak
|
||||
//! ordering compatible with the one used to create the
|
||||
//! the tree. NodePtrPriorityCompare compares two node_ptrs.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree, using "hint" as a hint to
|
||||
//! where it will be inserted. If "hint" is the upper_bound
|
||||
//! the insertion takes constant time (two comparisons in the worst case).
|
||||
@ -585,7 +585,7 @@ class treap_algorithms
|
||||
//! NodePtrPriorityCompare is a priority function object that induces a strict weak
|
||||
//! ordering compatible with the one used to create the
|
||||
//! the tree. NodePtrPriorityCompare compares two node_ptrs.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts new_node into the tree before "pos"
|
||||
//! and rotates the tree according to "pcomp".
|
||||
//!
|
||||
@ -611,7 +611,7 @@ class treap_algorithms
|
||||
//! NodePtrPriorityCompare is a priority function object that induces a strict weak
|
||||
//! ordering compatible with the one used to create the
|
||||
//! the tree. NodePtrPriorityCompare compares two node_ptrs.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts x into the tree in the last position
|
||||
//! and rotates the tree according to "pcomp".
|
||||
//!
|
||||
@ -636,7 +636,7 @@ class treap_algorithms
|
||||
//! NodePtrPriorityCompare is a priority function object that induces a strict weak
|
||||
//! ordering compatible with the one used to create the
|
||||
//! the tree. NodePtrPriorityCompare compares two node_ptrs.
|
||||
//!
|
||||
//!
|
||||
//! <b>Effects</b>: Inserts x into the tree in the first position
|
||||
//! and rotates the tree according to "pcomp".
|
||||
//!
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2009
|
||||
// (C) Copyright Ion Gaztanaga 2007-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -81,7 +81,7 @@ class treap_set_impl
|
||||
|
||||
public:
|
||||
//! <b>Effects</b>: Constructs an empty treap_set.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -114,13 +114,13 @@ class treap_set_impl
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
treap_set_impl(BOOST_RV_REF(treap_set_impl) x)
|
||||
: tree_(::boost::move(x.tree_))
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
treap_set_impl& operator=(BOOST_RV_REF(treap_set_impl) x)
|
||||
{ tree_ = ::boost::move(x.tree_); return *this; }
|
||||
|
||||
@ -405,7 +405,7 @@ class treap_set_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
|
||||
@ -524,7 +524,7 @@ class treap_set_impl
|
||||
//! If the check is successful, the user can construct the value_type and use
|
||||
//! "insert_commit" to insert the object in constant-time. This can give a total
|
||||
//! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
|
||||
//!
|
||||
//!
|
||||
//! "commit_data" remains valid for a subsequent "insert_commit" only if no more
|
||||
//! objects are inserted or erased from the treap_set.
|
||||
template<class KeyType, class KeyValueCompare, class KeyValuePriorityCompare>
|
||||
@ -1407,7 +1407,7 @@ class treap_multiset_impl
|
||||
|
||||
public:
|
||||
//! <b>Effects</b>: Constructs an empty treap_multiset.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -1440,13 +1440,13 @@ class treap_multiset_impl
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
treap_multiset_impl(BOOST_RV_REF(treap_multiset_impl) x)
|
||||
: tree_(::boost::move(x.tree_))
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
treap_multiset_impl& operator=(BOOST_RV_REF(treap_multiset_impl) x)
|
||||
{ tree_ = ::boost::move(x.tree_); return *this; }
|
||||
|
||||
@ -1731,7 +1731,7 @@ class treap_multiset_impl
|
||||
//!
|
||||
//! If cloner throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -113,7 +113,7 @@ class unordered_set_impl
|
||||
//!
|
||||
//! <b>Effects</b>: Constructs an empty unordered_set_impl, storing a reference
|
||||
//! to the bucket array and copies of the hasher and equal functors.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -134,7 +134,7 @@ class unordered_set_impl
|
||||
//!
|
||||
//! <b>Effects</b>: Constructs an empty unordered_set and inserts elements from
|
||||
//! [b, e).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: If N is std::distance(b, e): Average case is O(N)
|
||||
//! (with a good hash function and with buckets_len >= N),worst case O(N2).
|
||||
//!
|
||||
@ -155,13 +155,13 @@ class unordered_set_impl
|
||||
{ table_.insert_unique(b, e); }
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
unordered_set_impl(BOOST_RV_REF(unordered_set_impl) x)
|
||||
: table_(::boost::move(x.table_))
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
unordered_set_impl& operator=(BOOST_RV_REF(unordered_set_impl) x)
|
||||
{ table_ = ::boost::move(x.table_); return *this; }
|
||||
|
||||
@ -290,7 +290,7 @@ class unordered_set_impl
|
||||
//!
|
||||
//! If any operation throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner or hasher throw or hash or equality predicate copying
|
||||
@ -1184,7 +1184,7 @@ class unordered_multiset_impl
|
||||
//!
|
||||
//! <b>Effects</b>: Constructs an empty unordered_multiset, storing a reference
|
||||
//! to the bucket array and copies of the hasher and equal functors.
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant.
|
||||
//!
|
||||
//! <b>Throws</b>: If value_traits::node_traits::node
|
||||
@ -1205,7 +1205,7 @@ class unordered_multiset_impl
|
||||
//!
|
||||
//! <b>Effects</b>: Constructs an empty unordered_multiset and inserts elements from
|
||||
//! [b, e).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: If N is std::distance(b, e): Average case is O(N)
|
||||
//! (with a good hash function and with buckets_len >= N),worst case O(N2).
|
||||
//!
|
||||
@ -1226,13 +1226,13 @@ class unordered_multiset_impl
|
||||
{ table_.insert_equal(b, e); }
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
unordered_multiset_impl(BOOST_RV_REF(unordered_multiset_impl) x)
|
||||
: table_(::boost::move(x.table_))
|
||||
{}
|
||||
|
||||
//! <b>Effects</b>: to-do
|
||||
//!
|
||||
//!
|
||||
unordered_multiset_impl& operator=(BOOST_RV_REF(unordered_multiset_impl) x)
|
||||
{ table_ = ::boost::move(x.table_); return *this; }
|
||||
|
||||
@ -1362,7 +1362,7 @@ class unordered_multiset_impl
|
||||
//!
|
||||
//! If any operation throws, all cloned elements are unlinked and disposed
|
||||
//! calling Disposer::operator()(pointer).
|
||||
//!
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear to erased plus inserted elements.
|
||||
//!
|
||||
//! <b>Throws</b>: If cloner or hasher throw or hash or equality predicate copying
|
||||
|
@ -1,7 +1,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2009
|
||||
// (C) Copyright Ion Gaztanaga 2006-2012
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@ -95,10 +95,10 @@ struct unordered_node_traits
|
||||
{ n->prev_in_group_ = prev; }
|
||||
|
||||
static std::size_t get_hash(const const_node_ptr & n)
|
||||
{ return n->hash_; }
|
||||
{ return n->hash_; }
|
||||
|
||||
static void set_hash(const node_ptr & n, std::size_t h)
|
||||
{ n->hash_ = h; }
|
||||
{ n->hash_ = h; }
|
||||
};
|
||||
|
||||
template<class NodeTraits>
|
||||
|
Reference in New Issue
Block a user