X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=boost%2Fintrusive%2Filist.hpp;h=67590ee5f3e03129e7ae3a6f4be5427cfc432d6b;hb=afae50abf125df375ff1610b7a659f9b1da61bc0;hp=3947a7b3566984661a477b44523a592289711519;hpb=47368f306a577d1e46df69a7f729bd3893cbe5e7;p=senf.git diff --git a/boost/intrusive/ilist.hpp b/boost/intrusive/ilist.hpp index 3947a7b..67590ee 100644 --- a/boost/intrusive/ilist.hpp +++ b/boost/intrusive/ilist.hpp @@ -1,7 +1,7 @@ ///////////////////////////////////////////////////////////////////////////// // // (C) Copyright Olaf Krzikalla 2004-2006. -// (C) Copyright Ion Gaztañaga 2006-2007 +// (C) Copyright Ion Gazta�aga 2006-2007 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at @@ -14,14 +14,14 @@ #ifndef BOOST_INTRUSIVE_ILIST_HPP #define BOOST_INTRUSIVE_ILIST_HPP -#include +#include "detail/config_begin.hpp" #include #include -#include -#include -#include -#include -#include +#include "ilist_hook.hpp" +#include "list_algorithms.hpp" +#include "detail/pointer_type.hpp" +#include "detail/pointer_to_other.hpp" +#include "linking_policy.hpp" #include #include #include @@ -450,7 +450,7 @@ class ilist //! Throws: Nothing. //! //! Complexity: Constant. - reverse_iterator rend() + reverse_iterator rend() { return reverse_iterator(begin()); } //! Effects: Returns a const_reverse_iterator pointing to the end @@ -459,7 +459,7 @@ class ilist //! Throws: Nothing. //! //! Complexity: Constant. - const_reverse_iterator rend() const + const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } //! Effects: Returns the number of the elements contained in the list. @@ -1091,22 +1091,22 @@ class ilist template void unique_and_destroy(BinaryPredicate pred, Destroyer destroyer) { - if(!this->empty()){ - iterator first = begin(); - iterator after = first; - ++after; - while(after != this->end()){ - if(pred(*first, *after)){ - pointer p = after.operator->(); - after = erase(after); - destroyer(p); + if(!this->empty()) { + iterator first = begin(); + iterator after = first; + ++after; + while(after != this->end()) { + if(pred(*first, *after)) { + pointer p = after.operator->(); + after = erase(after); + destroyer(p); + } + else { + first = after++; + } } - else{ - first = after++; - } - } - } - } + } + } //! Requires: value must be a reference to a value inserted in a list. //! @@ -1195,6 +1195,6 @@ inline void swap(ilist& x, ilist& y) } //namespace intrusive } //namespace boost -#include +#include "detail/config_end.hpp" #endif //BOOST_INTRUSIVE_ILIST_HPP