Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68190 - branches/release/boost/range
From: neil_at_[hidden]
Date: 2011-01-16 12:07:32


Author: neilgroves
Date: 2011-01-16 12:07:27 EST (Sun, 16 Jan 2011)
New Revision: 68190
URL: http://svn.boost.org/trac/boost/changeset/68190

Log:
[boost][range] - Merge a fix to undo an erroneous change to iterator_range.size() that allowed it to compile for ranges that did not model the Random Access Range Concept and thereby broken the complexity guarantees.
Text files modified:
   branches/release/boost/range/iterator_range_core.hpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: branches/release/boost/range/iterator_range_core.hpp
==============================================================================
--- branches/release/boost/range/iterator_range_core.hpp (original)
+++ branches/release/boost/range/iterator_range_core.hpp 2011-01-16 12:07:27 EST (Sun, 16 Jan 2011)
@@ -231,7 +231,7 @@
 
             difference_type size() const
             {
- return std::distance(m_Begin, m_End);
+ return m_End - m_Begin;
             }
 
             bool empty() const


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