diff --git a/include/boost/intrusive/any_hook.hpp b/include/boost/intrusive/any_hook.hpp index 2e0976c..7d60de0 100644 --- a/include/boost/intrusive/any_hook.hpp +++ b/include/boost/intrusive/any_hook.hpp @@ -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::tag diff --git a/include/boost/intrusive/avl_set.hpp b/include/boost/intrusive/avl_set.hpp index 5be49a0..3bcde1c 100644 --- a/include/boost/intrusive/avl_set.hpp +++ b/include/boost/intrusive/avl_set.hpp @@ -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: //! Effects: Constructs an empty avl_set. - //! + //! //! Complexity: Constant. //! //! Throws: If value_traits::node_traits::node @@ -111,13 +111,13 @@ class avl_set_impl {} //! Effects: to-do - //! + //! avl_set_impl(BOOST_RV_REF(avl_set_impl) x) : tree_(::boost::move(x.tree_)) {} //! Effects: 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). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: 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 @@ -1290,7 +1290,7 @@ class avl_multiset_impl public: //! Effects: Constructs an empty avl_multiset. - //! + //! //! Complexity: Constant. //! //! Throws: If value_traits::node_traits::node @@ -1321,13 +1321,13 @@ class avl_multiset_impl {} //! Effects: to-do - //! + //! avl_multiset_impl(BOOST_RV_REF(avl_multiset_impl) x) : tree_(::boost::move(x.tree_)) {} //! Effects: 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). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. diff --git a/include/boost/intrusive/avl_set_hook.hpp b/include/boost/intrusive/avl_set_hook.hpp index cd368a2..825921f 100644 --- a/include/boost/intrusive/avl_set_hook.hpp +++ b/include/boost/intrusive/avl_set_hook.hpp @@ -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 diff --git a/include/boost/intrusive/avltree.hpp b/include/boost/intrusive/avltree.hpp index 49f2a63..8fac811 100644 --- a/include/boost/intrusive/avltree.hpp +++ b/include/boost/intrusive/avltree.hpp @@ -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; //! Effects: Constructs an empty tree. - //! + //! //! Complexity: Constant. //! //! Throws: 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 } //! Effects: 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); } //! Effects: 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 @@ -1238,7 +1238,7 @@ class avltree_impl //! //! If cloner throws, all cloned elements are unlinked and disposed //! calling Disposer::operator()(pointer). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. diff --git a/include/boost/intrusive/avltree_algorithms.hpp b/include/boost/intrusive/avltree_algorithms.hpp index bdf8d6c..29c5e81 100644 --- a/include/boost/intrusive/avltree_algorithms.hpp +++ b/include/boost/intrusive/avltree_algorithms.hpp @@ -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 //! Effects: First empties target tree calling //! void disposer::operator()(const node_ptr &) for every node of the tree //! except the header. - //! + //! //! Then, duplicates the entire tree pointed by "source_header" cloning each //! source node with node_ptr Cloner::operator()(const node_ptr &) 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. - //! + //! //! Effects: 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. - //! + //! //! Effects: Inserts new_node into the tree before "pos". //! //! Complexity: Constant-time. @@ -554,7 +554,7 @@ class avltree_algorithms //! Requires: "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. - //! + //! //! Effects: Inserts new_node into the tree before "pos". //! //! Complexity: Constant-time. @@ -573,7 +573,7 @@ class avltree_algorithms //! Requires: "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. - //! + //! //! Effects: Inserts new_node into the tree before "pos". //! //! Complexity: Constant-time. diff --git a/include/boost/intrusive/bs_set_hook.hpp b/include/boost/intrusive/bs_set_hook.hpp index edc4bb3..682426a 100644 --- a/include/boost/intrusive/bs_set_hook.hpp +++ b/include/boost/intrusive/bs_set_hook.hpp @@ -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 diff --git a/include/boost/intrusive/circular_list_algorithms.hpp b/include/boost/intrusive/circular_list_algorithms.hpp index d072a83..282f474 100644 --- a/include/boost/intrusive/circular_list_algorithms.hpp +++ b/include/boost/intrusive/circular_list_algorithms.hpp @@ -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 //! Complexity: Constant //! //! Throws: 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); } //! Effects: 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); diff --git a/include/boost/intrusive/circular_slist_algorithms.hpp b/include/boost/intrusive/circular_slist_algorithms.hpp index 39b94ef..c39b3d0 100644 --- a/include/boost/intrusive/circular_slist_algorithms.hpp +++ b/include/boost/intrusive/circular_slist_algorithms.hpp @@ -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)){ diff --git a/include/boost/intrusive/derivation_value_traits.hpp b/include/boost/intrusive/derivation_value_traits.hpp index 817e15c..0aae01b 100644 --- a/include/boost/intrusive/derivation_value_traits.hpp +++ b/include/boost/intrusive/derivation_value_traits.hpp @@ -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 diff --git a/include/boost/intrusive/detail/any_node_and_algorithms.hpp b/include/boost/intrusive/detail/any_node_and_algorithms.hpp index d2dffcf..b274135 100644 --- a/include/boost/intrusive/detail/any_node_and_algorithms.hpp +++ b/include/boost/intrusive/detail/any_node_and_algorithms.hpp @@ -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; } }; diff --git a/include/boost/intrusive/detail/assert.hpp b/include/boost/intrusive/detail/assert.hpp index 75d37e9..33de97f 100644 --- a/include/boost/intrusive/detail/assert.hpp +++ b/include/boost/intrusive/detail/assert.hpp @@ -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 diff --git a/include/boost/intrusive/detail/avltree_node.hpp b/include/boost/intrusive/detail/avltree_node.hpp index 0b3777a..aec0dab 100644 --- a/include/boost/intrusive/detail/avltree_node.hpp +++ b/include/boost/intrusive/detail/avltree_node.hpp @@ -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 diff --git a/include/boost/intrusive/detail/clear_on_destructor_base.hpp b/include/boost/intrusive/detail/clear_on_destructor_base.hpp index 6765dfa..1b5c27f 100644 --- a/include/boost/intrusive/detail/clear_on_destructor_base.hpp +++ b/include/boost/intrusive/detail/clear_on_destructor_base.hpp @@ -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) // diff --git a/include/boost/intrusive/detail/common_slist_algorithms.hpp b/include/boost/intrusive/detail/common_slist_algorithms.hpp index fbbbe46..942b35a 100644 --- a/include/boost/intrusive/detail/common_slist_algorithms.hpp +++ b/include/boost/intrusive/detail/common_slist_algorithms.hpp @@ -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) { diff --git a/include/boost/intrusive/detail/config_begin.hpp b/include/boost/intrusive/detail/config_begin.hpp index 64ef2f1..7d15336 100644 --- a/include/boost/intrusive/detail/config_begin.hpp +++ b/include/boost/intrusive/detail/config_begin.hpp @@ -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 diff --git a/include/boost/intrusive/detail/config_end.hpp b/include/boost/intrusive/detail/config_end.hpp index 4277cb5..d653030 100644 --- a/include/boost/intrusive/detail/config_end.hpp +++ b/include/boost/intrusive/detail/config_end.hpp @@ -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 diff --git a/include/boost/intrusive/detail/ebo_functor_holder.hpp b/include/boost/intrusive/detail/ebo_functor_holder.hpp index d4c2d15..850d074 100644 --- a/include/boost/intrusive/detail/ebo_functor_holder.hpp +++ b/include/boost/intrusive/detail/ebo_functor_holder.hpp @@ -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 diff --git a/include/boost/intrusive/detail/function_detector.hpp b/include/boost/intrusive/detail/function_detector.hpp index e9a9738..08cee2d 100644 --- a/include/boost/intrusive/detail/function_detector.hpp +++ b/include/boost/intrusive/detail/function_detector.hpp @@ -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 diff --git a/include/boost/intrusive/detail/generic_hook.hpp b/include/boost/intrusive/detail/generic_hook.hpp index 9b2f9a5..5ddd520 100644 --- a/include/boost/intrusive/detail/generic_hook.hpp +++ b/include/boost/intrusive/detail/generic_hook.hpp @@ -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 diff --git a/include/boost/intrusive/detail/has_member_function_callable_with.hpp b/include/boost/intrusive/detail/has_member_function_callable_with.hpp index 2bad7f5..6516e28 100644 --- a/include/boost/intrusive/detail/has_member_function_callable_with.hpp +++ b/include/boost/intrusive/detail/has_member_function_callable_with.hpp @@ -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 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 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); }; diff --git a/include/boost/intrusive/detail/hashtable_node.hpp b/include/boost/intrusive/detail/hashtable_node.hpp index ee8930c..86e6074 100644 --- a/include/boost/intrusive/detail/hashtable_node.hpp +++ b/include/boost/intrusive/detail/hashtable_node.hpp @@ -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); diff --git a/include/boost/intrusive/detail/is_stateful_value_traits.hpp b/include/boost/intrusive/detail/is_stateful_value_traits.hpp index e38f4de..8677c66 100644 --- a/include/boost/intrusive/detail/is_stateful_value_traits.hpp +++ b/include/boost/intrusive/detail/is_stateful_value_traits.hpp @@ -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 diff --git a/include/boost/intrusive/detail/list_node.hpp b/include/boost/intrusive/detail/list_node.hpp index 5280d87..d406af6 100644 --- a/include/boost/intrusive/detail/list_node.hpp +++ b/include/boost/intrusive/detail/list_node.hpp @@ -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 (*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 (*this); } - + list_iterator operator--(int) { list_iterator result (*this); diff --git a/include/boost/intrusive/detail/memory_util.hpp b/include/boost/intrusive/detail/memory_util.hpp index d65390d..e0256e4 100644 --- a/include/boost/intrusive/detail/memory_util.hpp +++ b/include/boost/intrusive/detail/memory_util.hpp @@ -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) // diff --git a/include/boost/intrusive/detail/mpl.hpp b/include/boost/intrusive/detail/mpl.hpp index ad6e3ec..1c44ca5 100644 --- a/include/boost/intrusive/detail/mpl.hpp +++ b/include/boost/intrusive/detail/mpl.hpp @@ -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 diff --git a/include/boost/intrusive/detail/parent_from_member.hpp b/include/boost/intrusive/detail/parent_from_member.hpp index a61ad94..2afffb4 100644 --- a/include/boost/intrusive/detail/parent_from_member.hpp +++ b/include/boost/intrusive/detail/parent_from_member.hpp @@ -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(&(parent->*ptr_to_member)); - return std::ptrdiff_t(member - reinterpret_cast(parent)); + const char *const member = static_cast(static_cast(&(parent->*ptr_to_member))); + return std::ptrdiff_t(member - static_cast(static_cast(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 } diff --git a/include/boost/intrusive/detail/preprocessor.hpp b/include/boost/intrusive/detail/preprocessor.hpp index a1a0d62..348b104 100644 --- a/include/boost/intrusive/detail/preprocessor.hpp +++ b/include/boost/intrusive/detail/preprocessor.hpp @@ -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) // diff --git a/include/boost/intrusive/detail/rbtree_node.hpp b/include/boost/intrusive/detail/rbtree_node.hpp index 0a632f1..b76582b 100644 --- a/include/boost/intrusive/detail/rbtree_node.hpp +++ b/include/boost/intrusive/detail/rbtree_node.hpp @@ -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 diff --git a/include/boost/intrusive/detail/slist_node.hpp b/include/boost/intrusive/detail/slist_node.hpp index 5f96a6c..0eddbcd 100644 --- a/include/boost/intrusive/detail/slist_node.hpp +++ b/include/boost/intrusive/detail/slist_node.hpp @@ -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 ::template rebind_pointer::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 (*this); } - + slist_iterator operator++(int) { slist_iterator result (*this); diff --git a/include/boost/intrusive/detail/transform_iterator.hpp b/include/boost/intrusive/detail/transform_iterator.hpp index 5b3da8d..488db9a 100644 --- a/include/boost/intrusive/detail/transform_iterator.hpp +++ b/include/boost/intrusive/detail/transform_iterator.hpp @@ -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 diff --git a/include/boost/intrusive/detail/tree_algorithms.hpp b/include/boost/intrusive/detail/tree_algorithms.hpp index 3f4fa13..710238b 100644 --- a/include/boost/intrusive/detail/tree_algorithms.hpp +++ b/include/boost/intrusive/detail/tree_algorithms.hpp @@ -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 //! Effects: First empties target tree calling //! void disposer::operator()(const node_ptr &) for every node of the tree //! except the header. - //! + //! //! Then, duplicates the entire tree pointed by "source_header" cloning each //! source node with node_ptr Cloner::operator()(const node_ptr &) 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; diff --git a/include/boost/intrusive/detail/tree_node.hpp b/include/boost/intrusive/detail/tree_node.hpp index e6b7578..09fa7a4 100644 --- a/include/boost/intrusive/detail/tree_node.hpp +++ b/include/boost/intrusive/detail/tree_node.hpp @@ -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 (*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 (*this); } - + tree_iterator operator--(int) { tree_iterator result (*this); diff --git a/include/boost/intrusive/detail/utilities.hpp b/include/boost/intrusive/detail/utilities.hpp index 66faa8b..661ee61 100644 --- a/include/boost/intrusive/detail/utilities.hpp +++ b/include/boost/intrusive/detail/utilities.hpp @@ -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 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) diff --git a/include/boost/intrusive/detail/workaround.hpp b/include/boost/intrusive/detail/workaround.hpp index 5de529f..87cab4b 100644 --- a/include/boost/intrusive/detail/workaround.hpp +++ b/include/boost/intrusive/detail/workaround.hpp @@ -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) // diff --git a/include/boost/intrusive/hashtable.hpp b/include/boost/intrusive/hashtable.hpp index dbca7d2..2435a08 100644 --- a/include/boost/intrusive/hashtable.hpp +++ b/include/boost/intrusive/hashtable.hpp @@ -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(to_clone)); } @@ -879,7 +879,7 @@ class hashtable_impl //! //! Effects: Constructs an empty unordered_set, storing a reference //! to the bucket array and copies of the key_hasher and equal_func functors. - //! + //! //! Complexity: Constant. //! //! Throws: If value_traits::node_traits::node @@ -905,7 +905,7 @@ class hashtable_impl } //! Effects: 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 } //! Effects: 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 > NodeDisposer; typedef node_cast_adaptor > NodeCloner; NodeDisposer node_disp(disposer, this); - + detail::exception_array_disposer 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); } //! Requires: 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))); - return const_local_iterator(sit, (hashtable_impl*)0); + return const_local_iterator(sit, (hashtable_impl*)0); } //! Requires: 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); } //! Requires: 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(this->priv_value_to_node(value))); - return const_local_iterator(sit, this); + return const_local_iterator(sit, this); } //! Effects: 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. - //! + //! //! Complexity: Linear to size(). //! //! Throws: 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 , detail::identity >::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 diff --git a/include/boost/intrusive/intrusive_fwd.hpp b/include/boost/intrusive/intrusive_fwd.hpp index dc18566..c95767e 100644 --- a/include/boost/intrusive/intrusive_fwd.hpp +++ b/include/boost/intrusive/intrusive_fwd.hpp @@ -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 diff --git a/include/boost/intrusive/linear_slist_algorithms.hpp b/include/boost/intrusive/linear_slist_algorithms.hpp index 66f4a87..db4092d 100644 --- a/include/boost/intrusive/linear_slist_algorithms.hpp +++ b/include/boost/intrusive/linear_slist_algorithms.hpp @@ -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)){ diff --git a/include/boost/intrusive/link_mode.hpp b/include/boost/intrusive/link_mode.hpp index 41dbebc..c04f775 100644 --- a/include/boost/intrusive/link_mode.hpp +++ b/include/boost/intrusive/link_mode.hpp @@ -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 diff --git a/include/boost/intrusive/list.hpp b/include/boost/intrusive/list.hpp index 28bc6b4..5450bc5 100644 --- a/include/boost/intrusive/list.hpp +++ b/include/boost/intrusive/list.hpp @@ -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()); } //! Requires: Dereferencing iterator must yield an lvalue of type value_type. //! //! Effects: Constructs a list equal to the range [first,last). //! - //! Complexity: Linear in std::distance(b, e). No copy constructors are called. + //! Complexity: Linear in std::distance(b, e). No copy constructors are called. //! //! Throws: 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 } //! Effects: 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); } //! Effects: to-do - //! + //! list_impl& operator=(BOOST_RV_REF(list_impl) x) { this->swap(x); return *this; } @@ -470,7 +470,7 @@ class list_impl //! Throws: Nothing. //! //! Complexity: Constant. - reverse_iterator rend() + reverse_iterator rend() { return reverse_iterator(begin()); } //! Effects: Returns a const_reverse_iterator pointing to the end @@ -479,7 +479,7 @@ class list_impl //! Throws: Nothing. //! //! Complexity: Constant. - const_reverse_iterator rend() const + const_reverse_iterator rend() const { return this->crend(); } //! Effects: Returns a const_reverse_iterator pointing to the end @@ -488,7 +488,7 @@ class list_impl //! Throws: Nothing. //! //! Complexity: Constant. - const_reverse_iterator crend() const + const_reverse_iterator crend() const { return const_reverse_iterator(this->begin()); } //! Precondition: 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). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: If cloner throws. Basic guarantee. diff --git a/include/boost/intrusive/list_hook.hpp b/include/boost/intrusive/list_hook.hpp index 25fb784..b674868 100644 --- a/include/boost/intrusive/list_hook.hpp +++ b/include/boost/intrusive/list_hook.hpp @@ -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 diff --git a/include/boost/intrusive/member_value_traits.hpp b/include/boost/intrusive/member_value_traits.hpp index 42219a6..0462dbd 100644 --- a/include/boost/intrusive/member_value_traits.hpp +++ b/include/boost/intrusive/member_value_traits.hpp @@ -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 diff --git a/include/boost/intrusive/options.hpp b/include/boost/intrusive/options.hpp index 950bd59..e657438 100644 --- a/include/boost/intrusive/options.hpp +++ b/include/boost/intrusive/options.hpp @@ -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 diff --git a/include/boost/intrusive/parent_from_member.hpp b/include/boost/intrusive/parent_from_member.hpp index f726b2b..f4658e5 100644 --- a/include/boost/intrusive/parent_from_member.hpp +++ b/include/boost/intrusive/parent_from_member.hpp @@ -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 diff --git a/include/boost/intrusive/pointer_plus_bits.hpp b/include/boost/intrusive/pointer_plus_bits.hpp index 578a508..a2a9f1b 100644 --- a/include/boost/intrusive/pointer_plus_bits.hpp +++ b/include/boost/intrusive/pointer_plus_bits.hpp @@ -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 diff --git a/include/boost/intrusive/pointer_traits.hpp b/include/boost/intrusive/pointer_traits.hpp index 98eaded..3ed1afb 100644 --- a/include/boost/intrusive/pointer_traits.hpp +++ b/include/boost/intrusive/pointer_traits.hpp @@ -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 template struct rebind_pointer { typedef U* type; }; - + //! Returns: addressof(r) //! static pointer pointer_to(reference r) diff --git a/include/boost/intrusive/rbtree.hpp b/include/boost/intrusive/rbtree.hpp index 806aa97..f843231 100644 --- a/include/boost/intrusive/rbtree.hpp +++ b/include/boost/intrusive/rbtree.hpp @@ -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; //! Effects: Constructs an empty tree. - //! + //! //! Complexity: Constant. //! //! Throws: 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 } //! Effects: 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); } //! Effects: 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 @@ -1242,7 +1242,7 @@ class rbtree_impl //! //! If cloner throws, all cloned elements are unlinked and disposed //! calling Disposer::operator()(pointer). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. diff --git a/include/boost/intrusive/rbtree_algorithms.hpp b/include/boost/intrusive/rbtree_algorithms.hpp index b47c97e..d31e2bb 100644 --- a/include/boost/intrusive/rbtree_algorithms.hpp +++ b/include/boost/intrusive/rbtree_algorithms.hpp @@ -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 //! Effects: First empties target tree calling //! void disposer::operator()(const node_ptr &) for every node of the tree //! except the header. - //! + //! //! Then, duplicates the entire tree pointed by "source_header" cloning each //! source node with node_ptr Cloner::operator()(const node_ptr &) 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. - //! + //! //! Effects: 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. - //! + //! //! Effects: Inserts new_node into the tree before "pos". //! //! Complexity: Constant-time. @@ -608,7 +608,7 @@ class rbtree_algorithms //! Requires: "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. - //! + //! //! Effects: Inserts new_node into the tree before "pos". //! //! Complexity: Constant-time. @@ -627,7 +627,7 @@ class rbtree_algorithms //! Requires: "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. - //! + //! //! Effects: Inserts new_node into the tree before "pos". //! //! Complexity: Constant-time. diff --git a/include/boost/intrusive/set.hpp b/include/boost/intrusive/set.hpp index 3491d3e..145b263 100644 --- a/include/boost/intrusive/set.hpp +++ b/include/boost/intrusive/set.hpp @@ -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: //! Effects: Constructs an empty set. - //! + //! //! Complexity: Constant. //! //! Throws: If value_traits::node_traits::node @@ -118,13 +118,13 @@ class set_impl {} //! Effects: to-do - //! + //! set_impl(BOOST_RV_REF(set_impl) x) : tree_(::boost::move(x.tree_)) {} //! Effects: 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). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: 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 @@ -1303,7 +1303,7 @@ class multiset_impl public: //! Effects: Constructs an empty multiset. - //! + //! //! Complexity: Constant. //! //! Throws: If value_traits::node_traits::node @@ -1334,13 +1334,13 @@ class multiset_impl {} //! Effects: to-do - //! + //! multiset_impl(BOOST_RV_REF(multiset_impl) x) : tree_(::boost::move(x.tree_)) {} //! Effects: 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). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: 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: diff --git a/include/boost/intrusive/set_hook.hpp b/include/boost/intrusive/set_hook.hpp index fe12476..2634b42 100644 --- a/include/boost/intrusive/set_hook.hpp +++ b/include/boost/intrusive/set_hook.hpp @@ -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 diff --git a/include/boost/intrusive/sg_set.hpp b/include/boost/intrusive/sg_set.hpp index af50922..81c1db2 100644 --- a/include/boost/intrusive/sg_set.hpp +++ b/include/boost/intrusive/sg_set.hpp @@ -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: //! Effects: Constructs an empty sg_set. - //! + //! //! Complexity: Constant. //! //! Throws: If value_traits::node_traits::node @@ -109,13 +109,13 @@ class sg_set_impl {} //! Effects: to-do - //! + //! sg_set_impl(BOOST_RV_REF(sg_set_impl) x) : tree_(::boost::move(x.tree_)) {} //! Effects: 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). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: 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 @@ -1326,7 +1326,7 @@ class sg_multiset_impl public: //! Effects: Constructs an empty sg_multiset. - //! + //! //! Complexity: Constant. //! //! Throws: If value_traits::node_traits::node @@ -1357,13 +1357,13 @@ class sg_multiset_impl {} //! Effects: to-do - //! + //! sg_multiset_impl(BOOST_RV_REF(sg_multiset_impl) x) : tree_(::boost::move(x.tree_)) {} //! Effects: 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). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. diff --git a/include/boost/intrusive/sgtree.hpp b/include/boost/intrusive/sgtree.hpp index 6630fff..7854af9 100644 --- a/include/boost/intrusive/sgtree.hpp +++ b/include/boost/intrusive/sgtree.hpp @@ -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; //! Effects: Constructs an empty tree. - //! + //! //! Complexity: Constant. //! //! Throws: 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 } //! Effects: 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); } //! Effects: 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 @@ -1040,7 +1040,7 @@ class sgtree_impl //! Note: Invalidates the iterators (but not the references) //! to the erased elements. No destructors are called. template - size_type erase(const KeyType& key, KeyValueCompare comp + size_type erase(const KeyType& key, KeyValueCompare comp /// @cond , typename detail::enable_if_c::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). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. diff --git a/include/boost/intrusive/sgtree_algorithms.hpp b/include/boost/intrusive/sgtree_algorithms.hpp index 1be6b4b..afb95ff 100644 --- a/include/boost/intrusive/sgtree_algorithms.hpp +++ b/include/boost/intrusive/sgtree_algorithms.hpp @@ -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 //! Effects: First empties target tree calling //! void disposer::operator()(const node_ptr &) for every node of the tree //! except the header. - //! + //! //! Then, duplicates the entire tree pointed by "source_header" cloning each //! source node with node_ptr Cloner::operator()(const node_ptr &) 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. - //! + //! //! Effects: 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. - //! + //! //! Effects: Inserts new_node into the tree before "pos". //! //! Complexity: Constant-time. @@ -567,7 +567,7 @@ class sgtree_algorithms //! Requires: "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. - //! + //! //! Effects: Inserts new_node into the tree before "pos". //! //! Complexity: Constant-time. @@ -589,7 +589,7 @@ class sgtree_algorithms //! Requires: "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. - //! + //! //! Effects: Inserts new_node into the tree before "pos". //! //! Complexity: Constant-time. diff --git a/include/boost/intrusive/slist.hpp b/include/boost/intrusive/slist.hpp index d9833b8..d7fc131 100644 --- a/include/boost/intrusive/slist.hpp +++ b/include/boost/intrusive/slist.hpp @@ -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 //! //! Effects: Constructs a list equal to [first,last). //! - //! Complexity: Linear in std::distance(b, e). No copy constructors are called. + //! Complexity: Linear in std::distance(b, e). No copy constructors are called. //! //! Throws: If value_traits::node_traits::node //! constructor throws (this does not happen with predefined Boost.Intrusive hooks). @@ -300,17 +300,17 @@ class slist_impl } //! Effects: 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); } //! Effects: 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). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: 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_) { - 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); } diff --git a/include/boost/intrusive/slist_hook.hpp b/include/boost/intrusive/slist_hook.hpp index a396d0b..cd94a7e 100644 --- a/include/boost/intrusive/slist_hook.hpp +++ b/include/boost/intrusive/slist_hook.hpp @@ -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 diff --git a/include/boost/intrusive/splay_set.hpp b/include/boost/intrusive/splay_set.hpp index 2cea5bd..ba6114d 100644 --- a/include/boost/intrusive/splay_set.hpp +++ b/include/boost/intrusive/splay_set.hpp @@ -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: //! Effects: Constructs an empty splay_set. - //! + //! //! Complexity: Constant. //! //! Throws: If value_traits::node_traits::node @@ -111,13 +111,13 @@ class splay_set_impl {} //! Effects: to-do - //! + //! splay_set_impl(BOOST_RV_REF(splay_set_impl) x) : tree_(::boost::move(x.tree_)) {} //! Effects: 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). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: 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 @@ -1312,7 +1312,7 @@ class splay_multiset_impl public: //! Effects: Constructs an empty splay_multiset. - //! + //! //! Complexity: Constant. //! //! Throws: If value_traits::node_traits::node @@ -1343,13 +1343,13 @@ class splay_multiset_impl {} //! Effects: to-do - //! + //! splay_multiset_impl(BOOST_RV_REF(splay_multiset_impl) x) : tree_(::boost::move(x.tree_)) {} //! Effects: 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). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. diff --git a/include/boost/intrusive/splay_set_hook.hpp b/include/boost/intrusive/splay_set_hook.hpp index 6086c4c..c8698c6 100644 --- a/include/boost/intrusive/splay_set_hook.hpp +++ b/include/boost/intrusive/splay_set_hook.hpp @@ -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 diff --git a/include/boost/intrusive/splaytree.hpp b/include/boost/intrusive/splaytree.hpp index e012b99..3db32e1 100644 --- a/include/boost/intrusive/splaytree.hpp +++ b/include/boost/intrusive/splaytree.hpp @@ -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; //! Effects: Constructs an empty tree. - //! + //! //! Complexity: Constant. //! //! Throws: 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 } //! Effects: 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); } //! Effects: 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 @@ -1179,7 +1179,7 @@ class splaytree_impl //! //! If cloner throws, all cloned elements are unlinked and disposed //! calling Disposer::operator()(pointer). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. diff --git a/include/boost/intrusive/splaytree_algorithms.hpp b/include/boost/intrusive/splaytree_algorithms.hpp index e3f5eba..79baa1f 100644 --- a/include/boost/intrusive/splaytree_algorithms.hpp +++ b/include/boost/intrusive/splaytree_algorithms.hpp @@ -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. - //! + //! //! Effects: 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. - //! + //! //! Effects: Inserts new_node into the tree before "pos". //! //! Complexity: Constant-time. @@ -568,7 +568,7 @@ class splaytree_algorithms //! Requires: "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. - //! + //! //! Effects: Inserts new_node into the tree before "pos". //! //! Complexity: Constant-time. @@ -587,7 +587,7 @@ class splaytree_algorithms //! Requires: "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. - //! + //! //! Effects: Inserts new_node into the tree before "pos". //! //! Complexity: Constant-time. @@ -650,7 +650,7 @@ class splaytree_algorithms //! Effects: First empties target tree calling //! void disposer::operator()(const node_ptr &) for every node of the tree //! except the header. - //! + //! //! Then, duplicates the entire tree pointed by "source_header" cloning each //! source node with node_ptr Cloner::operator()(const node_ptr &) 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()) diff --git a/include/boost/intrusive/treap.hpp b/include/boost/intrusive/treap.hpp index d0a4755..722f938 100644 --- a/include/boost/intrusive/treap.hpp +++ b/include/boost/intrusive/treap.hpp @@ -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; //! Effects: Constructs an empty treap. - //! + //! //! Complexity: Constant. //! //! Throws: 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 } //! Effects: 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); } //! Effects: 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 @@ -1349,7 +1349,7 @@ class treap_impl //! //! If cloner throws, all cloned elements are unlinked and disposed //! calling Disposer::operator()(pointer). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. diff --git a/include/boost/intrusive/treap_algorithms.hpp b/include/boost/intrusive/treap_algorithms.hpp index 44bff7a..92958e8 100644 --- a/include/boost/intrusive/treap_algorithms.hpp +++ b/include/boost/intrusive/treap_algorithms.hpp @@ -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 //! Effects: First empties target tree calling //! void disposer::operator()(const node_ptr &) for every node of the tree //! except the header. - //! + //! //! Then, duplicates the entire tree pointed by "source_header" cloning each //! source node with node_ptr Cloner::operator()(const node_ptr &) 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. - //! + //! //! Effects: 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. - //! + //! //! Effects: 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. - //! + //! //! Effects: 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. - //! + //! //! Effects: Inserts x into the tree in the first position //! and rotates the tree according to "pcomp". //! diff --git a/include/boost/intrusive/treap_set.hpp b/include/boost/intrusive/treap_set.hpp index 40c48b1..02a3353 100644 --- a/include/boost/intrusive/treap_set.hpp +++ b/include/boost/intrusive/treap_set.hpp @@ -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: //! Effects: Constructs an empty treap_set. - //! + //! //! Complexity: Constant. //! //! Throws: If value_traits::node_traits::node @@ -114,13 +114,13 @@ class treap_set_impl {} //! Effects: to-do - //! + //! treap_set_impl(BOOST_RV_REF(treap_set_impl) x) : tree_(::boost::move(x.tree_)) {} //! Effects: 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). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: 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 @@ -1407,7 +1407,7 @@ class treap_multiset_impl public: //! Effects: Constructs an empty treap_multiset. - //! + //! //! Complexity: Constant. //! //! Throws: If value_traits::node_traits::node @@ -1440,13 +1440,13 @@ class treap_multiset_impl {} //! Effects: to-do - //! + //! treap_multiset_impl(BOOST_RV_REF(treap_multiset_impl) x) : tree_(::boost::move(x.tree_)) {} //! Effects: 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). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: If cloner throws or predicate copy assignment throws. Basic guarantee. diff --git a/include/boost/intrusive/trivial_value_traits.hpp b/include/boost/intrusive/trivial_value_traits.hpp index c8cf1d5..5c166fd 100644 --- a/include/boost/intrusive/trivial_value_traits.hpp +++ b/include/boost/intrusive/trivial_value_traits.hpp @@ -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 diff --git a/include/boost/intrusive/unordered_set.hpp b/include/boost/intrusive/unordered_set.hpp index 3cdeed7..a06d74b 100644 --- a/include/boost/intrusive/unordered_set.hpp +++ b/include/boost/intrusive/unordered_set.hpp @@ -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 //! //! Effects: Constructs an empty unordered_set_impl, storing a reference //! to the bucket array and copies of the hasher and equal functors. - //! + //! //! Complexity: Constant. //! //! Throws: If value_traits::node_traits::node @@ -134,7 +134,7 @@ class unordered_set_impl //! //! Effects: Constructs an empty unordered_set and inserts elements from //! [b, e). - //! + //! //! Complexity: 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); } //! Effects: to-do - //! + //! unordered_set_impl(BOOST_RV_REF(unordered_set_impl) x) : table_(::boost::move(x.table_)) {} //! Effects: 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). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: If cloner or hasher throw or hash or equality predicate copying @@ -1184,7 +1184,7 @@ class unordered_multiset_impl //! //! Effects: Constructs an empty unordered_multiset, storing a reference //! to the bucket array and copies of the hasher and equal functors. - //! + //! //! Complexity: Constant. //! //! Throws: If value_traits::node_traits::node @@ -1205,7 +1205,7 @@ class unordered_multiset_impl //! //! Effects: Constructs an empty unordered_multiset and inserts elements from //! [b, e). - //! + //! //! Complexity: 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); } //! Effects: to-do - //! + //! unordered_multiset_impl(BOOST_RV_REF(unordered_multiset_impl) x) : table_(::boost::move(x.table_)) {} //! Effects: 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). - //! + //! //! Complexity: Linear to erased plus inserted elements. //! //! Throws: If cloner or hasher throw or hash or equality predicate copying diff --git a/include/boost/intrusive/unordered_set_hook.hpp b/include/boost/intrusive/unordered_set_hook.hpp index 1b0f55b..c7e95b2 100644 --- a/include/boost/intrusive/unordered_set_hook.hpp +++ b/include/boost/intrusive/unordered_set_hook.hpp @@ -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