diff --git a/include/boost/intrusive/avltree_algorithms.hpp b/include/boost/intrusive/avltree_algorithms.hpp index 8109035..751c9b1 100644 --- a/include/boost/intrusive/avltree_algorithms.hpp +++ b/include/boost/intrusive/avltree_algorithms.hpp @@ -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; diff --git a/include/boost/intrusive/bs_set.hpp b/include/boost/intrusive/bs_set.hpp index c9594ac..62e7d00 100644 --- a/include/boost/intrusive/bs_set.hpp +++ b/include/boost/intrusive/bs_set.hpp @@ -172,7 +172,7 @@ class bs_set_impl //! @copydoc ::boost::intrusive::bstree::clone_from template 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 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 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 iterator lower_bound(const KeyType& key, KeyValueCompare comp); diff --git a/include/boost/intrusive/derivation_value_traits.hpp b/include/boost/intrusive/derivation_value_traits.hpp index 87bc489..64a4476 100644 --- a/include/boost/intrusive/derivation_value_traits.hpp +++ b/include/boost/intrusive/derivation_value_traits.hpp @@ -29,7 +29,7 @@ namespace intrusive { //!from user defined node traits where value_traits::value_type will //!derive from node_traits::node -template) { - 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 diff --git a/include/boost/intrusive/intrusive_fwd.hpp b/include/boost/intrusive/intrusive_fwd.hpp index a449816..389b688 100644 --- a/include/boost/intrusive/intrusive_fwd.hpp +++ b/include/boost/intrusive/intrusive_fwd.hpp @@ -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 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 +template struct max_pointer_plus_bits; -template +template struct max_pointer_plus_bits; template struct pointer_plus_bits; -template +template struct pointer_plus_bits; template diff --git a/include/boost/intrusive/link_mode.hpp b/include/boost/intrusive/link_mode.hpp index c7245d9..53f4f75 100644 --- a/include/boost/intrusive/link_mode.hpp +++ b/include/boost/intrusive/link_mode.hpp @@ -50,7 +50,7 @@ enum link_mode_type{ template struct is_safe_autounlink { - static const bool value = + static const bool value = (int)link_mode == (int)auto_unlink || (int)link_mode == (int)safe_link; }; diff --git a/include/boost/intrusive/options.hpp b/include/boost/intrusive/options.hpp index a910167..2e4fd24 100644 --- a/include/boost/intrusive/options.hpp +++ b/include/boost/intrusive/options.hpp @@ -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 member_value_traits; template diff --git a/include/boost/intrusive/pack_options.hpp b/include/boost/intrusive/pack_options.hpp index fa00bea..3e163bb 100644 --- a/include/boost/intrusive/pack_options.hpp +++ b/include/boost/intrusive/pack_options.hpp @@ -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: diff --git a/include/boost/intrusive/priority_compare.hpp b/include/boost/intrusive/priority_compare.hpp index 419a7d2..09a1d09 100644 --- a/include/boost/intrusive/priority_compare.hpp +++ b/include/boost/intrusive/priority_compare.hpp @@ -20,7 +20,7 @@ #include #include -#include +#include namespace boost { namespace intrusive { @@ -56,8 +56,8 @@ struct get_prio /// @endcond -} //namespace intrusive -} //namespace boost +} //namespace intrusive +} //namespace boost #include diff --git a/include/boost/intrusive/rbtree_algorithms.hpp b/include/boost/intrusive/rbtree_algorithms.hpp index 63e4d12..1ea4283 100644 --- a/include/boost/intrusive/rbtree_algorithms.hpp +++ b/include/boost/intrusive/rbtree_algorithms.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&) diff --git a/include/boost/intrusive/set.hpp b/include/boost/intrusive/set.hpp index 9d9256f..60f9f8c 100644 --- a/include/boost/intrusive/set.hpp +++ b/include/boost/intrusive/set.hpp @@ -174,7 +174,7 @@ class set_impl //! @copydoc ::boost::intrusive::rbtree::clone_from template 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 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 iterator lower_bound(const KeyType& key, KeyValueCompare comp); diff --git a/include/boost/intrusive/sg_set.hpp b/include/boost/intrusive/sg_set.hpp index f122809..39a4d73 100644 --- a/include/boost/intrusive/sg_set.hpp +++ b/include/boost/intrusive/sg_set.hpp @@ -172,7 +172,7 @@ class sg_set_impl //! @copydoc ::boost::intrusive::sgtree::clone_from template 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 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 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 iterator lower_bound(const KeyType& key, KeyValueCompare comp); diff --git a/include/boost/intrusive/sgtree_algorithms.hpp b/include/boost/intrusive/sgtree_algorithms.hpp index cb5f71c..af151c7 100644 --- a/include/boost/intrusive/sgtree_algorithms.hpp +++ b/include/boost/intrusive/sgtree_algorithms.hpp @@ -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 diff --git a/include/boost/intrusive/splay_set.hpp b/include/boost/intrusive/splay_set.hpp index 4262eac..dcfe49d 100644 --- a/include/boost/intrusive/splay_set.hpp +++ b/include/boost/intrusive/splay_set.hpp @@ -172,7 +172,7 @@ class splay_set_impl //! @copydoc ::boost::intrusive::splaytree::clone_from template 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 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 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(); diff --git a/include/boost/intrusive/splaytree_algorithms.hpp b/include/boost/intrusive/splaytree_algorithms.hpp index 7e4c657..61c9813 100644 --- a/include/boost/intrusive/splaytree_algorithms.hpp +++ b/include/boost/intrusive/splaytree_algorithms.hpp @@ -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); diff --git a/include/boost/intrusive/treap.hpp b/include/boost/intrusive/treap.hpp index 77cd77f..c271113 100644 --- a/include/boost/intrusive/treap.hpp +++ b/include/boost/intrusive/treap.hpp @@ -38,8 +38,8 @@ #include #include -#include -#include +#include +#include //std::pair namespace boost { @@ -104,7 +104,7 @@ class treap_impl 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 iterator lower_bound(const KeyType& key, KeyValueCompare comp); diff --git a/include/boost/intrusive/treap_set.hpp b/include/boost/intrusive/treap_set.hpp index 66b0531..65cc086 100644 --- a/include/boost/intrusive/treap_set.hpp +++ b/include/boost/intrusive/treap_set.hpp @@ -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 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 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 iterator lower_bound(const KeyType& key, KeyValueCompare comp); diff --git a/test/bounded_pointer.hpp b/test/bounded_pointer.hpp index c5e8e9b..b6d568a 100644 --- a/test/bounded_pointer.hpp +++ b/test/bounded_pointer.hpp @@ -68,10 +68,10 @@ class bounded_pointer operator= (const bounded_pointer & 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 diff --git a/test/default_hook_test.cpp b/test/default_hook_test.cpp index c7ef908..a8efa99 100644 --- a/test/default_hook_test.cpp +++ b/test/default_hook_test.cpp @@ -78,7 +78,7 @@ int main() //Create several MyClass objects, each one with a different value std::vector values; for(int i = 0; i < 100; ++i) values.push_back(MyClass(i)); - + { List my_list; Slist my_slist; diff --git a/test/generic_assoc_test.hpp b/test/generic_assoc_test.hpp index 9b3223c..bf819b4 100644 --- a/test/generic_assoc_test.hpp +++ b/test/generic_assoc_test.hpp @@ -154,7 +154,7 @@ void test_generic_assoc::test_insert_erase_burst( } BOOST_TEST(testset.empty()); } - + { //Now random insertions + erasure assoc_type testset; typedef typename value_cont_type::iterator vec_iterator; diff --git a/test/nonhook_node.hpp b/test/nonhook_node.hpp index f862801..2127083 100644 --- a/test/nonhook_node.hpp +++ b/test/nonhook_node.hpp @@ -97,7 +97,7 @@ struct nonhook_node_member_value_traits { return pointer_traits::pointer_to(static_cast(value.*P)); } - + static pointer to_value_ptr(node_ptr n) { return pointer_traits::pointer_to