Boost logo

Boost-Commit :

From: joel_at_[hidden]
Date: 2008-08-15 08:14:00


Author: djowel
Date: 2008-08-15 08:13:59 EDT (Fri, 15 Aug 2008)
New Revision: 48157
URL: http://svn.boost.org/trac/boost/changeset/48157

Log:
fix: when testing for equality, always check the underlying iterators when _isend is not the same for the LHS and the RHS
Text files modified:
   trunk/boost/spirit/home/classic/iterator/position_iterator.hpp | 3 +--
   1 files changed, 1 insertions(+), 2 deletions(-)

Modified: trunk/boost/spirit/home/classic/iterator/position_iterator.hpp
==============================================================================
--- trunk/boost/spirit/home/classic/iterator/position_iterator.hpp (original)
+++ trunk/boost/spirit/home/classic/iterator/position_iterator.hpp 2008-08-15 08:13:59 EDT (Fri, 15 Aug 2008)
@@ -289,8 +289,7 @@
         OtherDerivedT const &rhs = static_cast<OtherDerivedT const &>(x);
         bool x_is_end = rhs._isend;
 
- return (_isend && x_is_end) ||
- (!_isend && !x_is_end && this->base() == rhs.base());
+ return (_isend && x_is_end) || (this->base() == rhs.base());
     }
 
 protected:


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk