forked from boostorg/intrusive
Removed trailing spaces.
This commit is contained in:
@ -176,7 +176,7 @@ class avltree_algorithms
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
|
||||
static void swap_tree(const node_ptr & header1, const node_ptr & header2);
|
||||
|
||||
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(const node_ptr&,const node_ptr&)
|
||||
@ -612,7 +612,7 @@ class avltree_algorithms
|
||||
const node_ptr c = NodeTraits::get_right(a_oldleft);
|
||||
bstree_algo::rotate_left_no_parent_fix(a_oldleft, c);
|
||||
//No need to link c with a [NodeTraits::set_parent(c, a) + NodeTraits::set_left(a, c)]
|
||||
//as c is not root and another rotation is coming
|
||||
//as c is not root and another rotation is coming
|
||||
bstree_algo::rotate_right(a, c, NodeTraits::get_parent(a), hdr);
|
||||
left_right_balancing(a, a_oldleft, c);
|
||||
return c;
|
||||
|
@ -172,7 +172,7 @@ class bs_set_impl
|
||||
//! @copydoc ::boost::intrusive::bstree::clone_from
|
||||
template <class Cloner, class Disposer>
|
||||
void clone_from(const bs_set_impl &src, Cloner cloner, Disposer disposer);
|
||||
|
||||
|
||||
#endif //#ifdef BOOST_iNTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::insert_unique(reference)
|
||||
@ -266,7 +266,7 @@ class bs_set_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::lower_bound(const_reference)
|
||||
iterator lower_bound(const_reference value);
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyValueCompare)
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
iterator lower_bound(const KeyType& key, KeyValueCompare comp);
|
||||
@ -710,10 +710,10 @@ class bs_multiset_impl
|
||||
//! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyValueCompare)const
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
size_type count(const KeyType& key, KeyValueCompare comp) const;
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::lower_bound(const_reference)
|
||||
iterator lower_bound(const_reference value);
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyValueCompare)
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
iterator lower_bound(const KeyType& key, KeyValueCompare comp);
|
||||
|
@ -29,7 +29,7 @@ namespace intrusive {
|
||||
//!from user defined node traits where value_traits::value_type will
|
||||
//!derive from node_traits::node
|
||||
|
||||
template<class T, class NodeTraits, link_mode_type LinkMode
|
||||
template<class T, class NodeTraits, link_mode_type LinkMode
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
= safe_link
|
||||
#endif
|
||||
|
@ -154,7 +154,7 @@ namespace detail {
|
||||
|
||||
inline std::size_t floor_log2 (std::size_t v, integer<std::size_t, 32>)
|
||||
{
|
||||
static const int MultiplyDeBruijnBitPosition[32] =
|
||||
static const int MultiplyDeBruijnBitPosition[32] =
|
||||
{
|
||||
0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30,
|
||||
8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31
|
||||
|
@ -25,15 +25,15 @@
|
||||
//! - boost::intrusive::list / boost::intrusive::list_base_hook / boost::intrusive::list_member_hook
|
||||
//! - boost::intrusive::bstree / boost::intrusive::bs_set / boost::intrusive::bs_multiset /
|
||||
//! boost::intrusive::bs_set_base_hook / boost::intrusive::bs_set_member_hook
|
||||
//! - boost::intrusive::rbtree / boost::intrusive::set / boost::intrusive::multiset /
|
||||
//! - boost::intrusive::rbtree / boost::intrusive::set / boost::intrusive::multiset /
|
||||
//! boost::intrusive::set_base_hook / boost::intrusive::set_member_hook
|
||||
//! - boost::intrusive::avltree / boost::intrusive::avl_set / boost::intrusive::avl_multiset /
|
||||
//! boost::intrusive::avl_set_base_hook / boost::intrusive::avl_set_member_hook
|
||||
//! - boost::intrusive::splaytree / boost::intrusive::splay_set / boost::intrusive::splay_multiset
|
||||
//! - boost::intrusive::sgtree / boost::intrusive::sg_set / boost::intrusive::sg_multiset
|
||||
//! - boost::intrusive::splaytree / boost::intrusive::splay_set / boost::intrusive::splay_multiset
|
||||
//! - boost::intrusive::sgtree / boost::intrusive::sg_set / boost::intrusive::sg_multiset
|
||||
//! - boost::intrusive::treap / boost::intrusive::treap_set / boost::intrusive::treap_multiset
|
||||
//! - boost::intrusive::hashtable / boost::intrusive::unordered_set / boost::intrusive::unordered_multiset /
|
||||
//! boost::intrusive::unordered_set_base_hook / boost::intrusive::unordered_set_member_hook /
|
||||
//! boost::intrusive::unordered_set_base_hook / boost::intrusive::unordered_set_member_hook /
|
||||
//! - boost::intrusive::any_base_hook / boost::intrusive::any_member_hook
|
||||
//!
|
||||
//! It forward declares the following container or hook options:
|
||||
@ -50,7 +50,7 @@
|
||||
//! boost::intrusive::trivial_value_traits
|
||||
//!
|
||||
//! Finally it forward declares the following general purpose utilities:
|
||||
//! - boost::intrusive::pointer_plus_bits / boost::intrusive::priority_compare.
|
||||
//! - boost::intrusive::pointer_plus_bits / boost::intrusive::priority_compare.
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
|
||||
@ -630,7 +630,7 @@ struct hash;
|
||||
template<typename ValueTraits> struct value_traits;
|
||||
|
||||
template< typename Parent
|
||||
, typename MemberHook
|
||||
, typename MemberHook
|
||||
, MemberHook Parent::* PtrToMember>
|
||||
struct member_hook;
|
||||
|
||||
@ -703,16 +703,16 @@ struct trivial_value_traits;
|
||||
|
||||
//Additional utilities
|
||||
|
||||
template<typename VoidPointer, std::size_t Alignment>
|
||||
template<typename VoidPointer, std::size_t Alignment>
|
||||
struct max_pointer_plus_bits;
|
||||
|
||||
template<std::size_t Alignment>
|
||||
template<std::size_t Alignment>
|
||||
struct max_pointer_plus_bits<void *, Alignment>;
|
||||
|
||||
template<typename Pointer, std::size_t NumBits>
|
||||
struct pointer_plus_bits;
|
||||
|
||||
template<typename T, std::size_t NumBits>
|
||||
template<typename T, std::size_t NumBits>
|
||||
struct pointer_plus_bits<T *, NumBits>;
|
||||
|
||||
template<typename Ptr>
|
||||
|
@ -50,7 +50,7 @@ enum link_mode_type{
|
||||
template <link_mode_type link_mode>
|
||||
struct is_safe_autounlink
|
||||
{
|
||||
static const bool value =
|
||||
static const bool value =
|
||||
(int)link_mode == (int)auto_unlink ||
|
||||
(int)link_mode == (int)safe_link;
|
||||
};
|
||||
|
@ -126,7 +126,7 @@ struct member_hook
|
||||
// //always single inheritance, the offset of the node is exactly the offset of
|
||||
// //the hook. Since the node type is shared between all member hooks, this saves
|
||||
// //quite a lot of symbol stuff.
|
||||
// , (Ptr2MemNode)PtrToMember
|
||||
// , (Ptr2MemNode)PtrToMember
|
||||
// , MemberHook::hooktags::link_mode> member_value_traits;
|
||||
typedef mhtraits <Parent, MemberHook, PtrToMember> member_value_traits;
|
||||
template<class Base>
|
||||
|
@ -257,7 +257,7 @@ struct OPTION_NAME \
|
||||
//! - a default options class defining initial static constant
|
||||
//! and typedefs
|
||||
//! - several options defined with BOOST_INTRUSIVE_OPTION_CONSTANT and
|
||||
//! BOOST_INTRUSIVE_OPTION_TYPE
|
||||
//! BOOST_INTRUSIVE_OPTION_TYPE
|
||||
//!
|
||||
//! and packs them together in a new type that defines all options as
|
||||
//! member typedefs or static constant values. Given options of form:
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
|
||||
#include <functional>
|
||||
#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
@ -56,8 +56,8 @@ struct get_prio<void, T>
|
||||
|
||||
/// @endcond
|
||||
|
||||
} //namespace intrusive
|
||||
} //namespace boost
|
||||
} //namespace intrusive
|
||||
} //namespace boost
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
|
@ -187,7 +187,7 @@ class rbtree_algorithms
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
|
||||
static void swap_tree(const node_ptr & header1, const node_ptr & header2);
|
||||
|
||||
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(const node_ptr&,const node_ptr&)
|
||||
|
@ -174,7 +174,7 @@ class set_impl
|
||||
//! @copydoc ::boost::intrusive::rbtree::clone_from
|
||||
template <class Cloner, class Disposer>
|
||||
void clone_from(const set_impl &src, Cloner cloner, Disposer disposer);
|
||||
|
||||
|
||||
#endif //#ifdef BOOST_iNTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::insert_unique(reference)
|
||||
@ -268,7 +268,7 @@ class set_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::lower_bound(const_reference)
|
||||
iterator lower_bound(const_reference value);
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::lower_bound(const KeyType&,KeyValueCompare)
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
iterator lower_bound(const KeyType& key, KeyValueCompare comp);
|
||||
@ -715,7 +715,7 @@ class multiset_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::lower_bound(const_reference)
|
||||
iterator lower_bound(const_reference value);
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::rbtree::lower_bound(const KeyType&,KeyValueCompare)
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
iterator lower_bound(const KeyType& key, KeyValueCompare comp);
|
||||
|
@ -172,7 +172,7 @@ class sg_set_impl
|
||||
//! @copydoc ::boost::intrusive::sgtree::clone_from
|
||||
template <class Cloner, class Disposer>
|
||||
void clone_from(const sg_set_impl &src, Cloner cloner, Disposer disposer);
|
||||
|
||||
|
||||
#endif //#ifdef BOOST_iNTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::insert_unique(reference)
|
||||
@ -266,7 +266,7 @@ class sg_set_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::lower_bound(const_reference)
|
||||
iterator lower_bound(const_reference value);
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::lower_bound(const KeyType&,KeyValueCompare)
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
iterator lower_bound(const KeyType& key, KeyValueCompare comp);
|
||||
@ -723,10 +723,10 @@ class sg_multiset_impl
|
||||
//! @copydoc ::boost::intrusive::sgtree::count(const KeyType&,KeyValueCompare)const
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
size_type count(const KeyType& key, KeyValueCompare comp) const;
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::lower_bound(const_reference)
|
||||
iterator lower_bound(const_reference value);
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::sgtree::lower_bound(const KeyType&,KeyValueCompare)
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
iterator lower_bound(const KeyType& key, KeyValueCompare comp);
|
||||
|
@ -320,12 +320,12 @@ class sgtree_algorithms
|
||||
if(tree_size > max_tree_size)
|
||||
max_tree_size = tree_size;
|
||||
|
||||
if(tree_size > 2 && //Nothing to do with only the root
|
||||
if(tree_size > 2 && //Nothing to do with only the root
|
||||
//Check if the root node is unbalanced
|
||||
//Scapegoat paper depth counts root depth as zero and "depth" counts root as 1,
|
||||
//but since "depth" is the depth of the ancestor of x, i == depth
|
||||
depth > h_alpha(tree_size)){
|
||||
|
||||
|
||||
//Find the first non height-balanced node
|
||||
//as described in the section 4.2 of the paper.
|
||||
//This method is the alternative method described
|
||||
|
@ -172,7 +172,7 @@ class splay_set_impl
|
||||
//! @copydoc ::boost::intrusive::splaytree::clone_from
|
||||
template <class Cloner, class Disposer>
|
||||
void clone_from(const splay_set_impl &src, Cloner cloner, Disposer disposer);
|
||||
|
||||
|
||||
#endif //#ifdef BOOST_iNTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::insert_unique(reference)
|
||||
@ -273,7 +273,7 @@ class splay_set_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::lower_bound(const_reference)
|
||||
iterator lower_bound(const_reference value);
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::lower_bound(const KeyType&,KeyValueCompare)
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
iterator lower_bound(const KeyType& key, KeyValueCompare comp);
|
||||
@ -388,7 +388,7 @@ class splay_set_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::splay_down(const_reference)
|
||||
iterator splay_down(const_reference value);
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::rebalance
|
||||
void rebalance();
|
||||
|
||||
@ -736,7 +736,7 @@ class splay_multiset_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::lower_bound(const_reference)
|
||||
iterator lower_bound(const_reference value);
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::lower_bound(const KeyType&,KeyValueCompare)
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
iterator lower_bound(const KeyType& key, KeyValueCompare comp);
|
||||
@ -843,7 +843,7 @@ class splay_multiset_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::splay_down(const_reference)
|
||||
iterator splay_down(const_reference value);
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::splaytree::rebalance
|
||||
void rebalance();
|
||||
|
||||
|
@ -86,7 +86,7 @@ struct splaydown_assemble_and_fix_header
|
||||
// left(t), right(t) := right(null), left(null);
|
||||
//end assemble;
|
||||
{ // left(r), right(l) := right(t), left(t);
|
||||
|
||||
|
||||
node_ptr const old_t_left = NodeTraits::get_left(t_);
|
||||
node_ptr const old_t_right = NodeTraits::get_right(t_);
|
||||
NodeTraits::set_right(l_, old_t_left);
|
||||
@ -222,7 +222,7 @@ class splaytree_algorithms
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::init_header(const node_ptr&)
|
||||
static void init_header(const node_ptr & header);
|
||||
|
||||
|
||||
#endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree_algorithms::erase(const node_ptr&,const node_ptr&)
|
||||
@ -233,7 +233,7 @@ class splaytree_algorithms
|
||||
if(NodeTraits::get_left(z)){
|
||||
splay_up(bstree_algo::prev_node(z), header);
|
||||
}
|
||||
|
||||
|
||||
//possibility 2
|
||||
//if(NodeTraits::get_left(z)){
|
||||
// node_ptr l = NodeTraits::get_left(z);
|
||||
|
@ -38,8 +38,8 @@
|
||||
#include <boost/move/adl_move_swap.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
|
||||
#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
|
||||
|
||||
|
||||
namespace boost {
|
||||
@ -104,7 +104,7 @@ class treap_impl
|
||||
<typename get_prio_type::type> prio_base;
|
||||
|
||||
/// @endcond
|
||||
|
||||
|
||||
typedef typename implementation_defined::pointer pointer;
|
||||
typedef typename implementation_defined::const_pointer const_pointer;
|
||||
typedef typename implementation_defined::value_type value_type;
|
||||
@ -933,7 +933,7 @@ class treap_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::lower_bound(const_reference)
|
||||
iterator lower_bound(const_reference value);
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyValueCompare)
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
iterator lower_bound(const KeyType& key, KeyValueCompare comp);
|
||||
|
@ -311,7 +311,7 @@ class treap_set_impl
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::lower_bound(const_reference)
|
||||
iterator lower_bound(const_reference value);
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyValueCompare)
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
iterator lower_bound(const KeyType& key, KeyValueCompare comp);
|
||||
@ -784,10 +784,10 @@ class treap_multiset_impl
|
||||
//! @copydoc ::boost::intrusive::treap::count(const KeyType&,KeyValueCompare)const
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
size_type count(const KeyType& key, KeyValueCompare comp) const;
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::lower_bound(const_reference)
|
||||
iterator lower_bound(const_reference value);
|
||||
|
||||
|
||||
//! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyValueCompare)
|
||||
template<class KeyType, class KeyValueCompare>
|
||||
iterator lower_bound(const KeyType& key, KeyValueCompare comp);
|
||||
|
@ -68,10 +68,10 @@ 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); }
|
||||
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()
|
||||
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); }
|
||||
|
||||
static mut_val_t* base()
|
||||
@ -151,7 +151,7 @@ class bounded_reference
|
||||
bounded_reference()
|
||||
: m_offset(max_offset)
|
||||
{}
|
||||
|
||||
|
||||
bounded_reference(const bounded_reference& other)
|
||||
: m_offset(other.m_offset)
|
||||
{}
|
||||
@ -222,7 +222,7 @@ class bounded_allocator
|
||||
m_in_use[p.m_offset] = true;
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
void deallocate(pointer p, size_t n)
|
||||
{
|
||||
assert(inited());
|
||||
@ -239,12 +239,12 @@ class bounded_allocator
|
||||
// allocate non-constructed storage
|
||||
m_base = static_cast< T* >(::operator new [] (max_offset * sizeof(T)));
|
||||
}
|
||||
|
||||
|
||||
static bool inited()
|
||||
{
|
||||
return m_in_use.size() == max_offset;
|
||||
}
|
||||
|
||||
|
||||
static bool is_clear()
|
||||
{
|
||||
assert(inited());
|
||||
@ -257,7 +257,7 @@ class bounded_allocator
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static void destroy()
|
||||
{
|
||||
// deallocate storage without destructors
|
||||
|
@ -78,7 +78,7 @@ int main()
|
||||
//Create several MyClass objects, each one with a different value
|
||||
std::vector<MyClass> values;
|
||||
for(int i = 0; i < 100; ++i) values.push_back(MyClass(i));
|
||||
|
||||
|
||||
{
|
||||
List my_list;
|
||||
Slist my_slist;
|
||||
|
@ -154,7 +154,7 @@ void test_generic_assoc<ValueTraits, ContainerDefiner>::test_insert_erase_burst(
|
||||
}
|
||||
BOOST_TEST(testset.empty());
|
||||
}
|
||||
|
||||
|
||||
{ //Now random insertions + erasure
|
||||
assoc_type testset;
|
||||
typedef typename value_cont_type::iterator vec_iterator;
|
||||
|
@ -97,7 +97,7 @@ struct nonhook_node_member_value_traits
|
||||
{
|
||||
return pointer_traits<const_node_ptr>::pointer_to(static_cast<const node&>(value.*P));
|
||||
}
|
||||
|
||||
|
||||
static pointer to_value_ptr(node_ptr n)
|
||||
{
|
||||
return pointer_traits<pointer>::pointer_to
|
||||
|
Reference in New Issue
Block a user