From cafea6aea537eb7fa9fa9994ddcf987285c6e7dc Mon Sep 17 00:00:00 2001 From: Neil Groves Date: Sun, 16 Jan 2011 17:07:27 +0000 Subject: [PATCH] [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. [SVN r68190] --- include/boost/range/iterator_range_core.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/range/iterator_range_core.hpp b/include/boost/range/iterator_range_core.hpp index 7664c2e..7ef7523 100755 --- a/include/boost/range/iterator_range_core.hpp +++ b/include/boost/range/iterator_range_core.hpp @@ -231,7 +231,7 @@ namespace boost difference_type size() const { - return std::distance(m_Begin, m_End); + return m_End - m_Begin; } bool empty() const