Subject: [Boost-bugs] [Boost C++ Libraries] #4333: boost::iterator_range<T>::size() only works for T = random access iterator
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-10 18:35:54
#4333: boost::iterator_range<T>::size() only works for T = random access iterator
--------------------------+-------------------------------------------------
Reporter: mstefanro | Owner: neilgroves
Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: range
Version: Boost 1.44.0 | Severity: Problem
Keywords: |
--------------------------+-------------------------------------------------
While the documentation of boost::iterator_range<T> states that size()
should work on all Forward Iterators, boost::iterator_range<T> relies on
operator- being available to T.
I suggest making size() equivalent to boost::distance(it).
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4333> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:03 UTC