[Boost-bugs] [Boost C++ Libraries] #2539: advance() and distance() for new iterator concepts

Subject: [Boost-bugs] [Boost C++ Libraries] #2539: advance() and distance() for new iterator concepts
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-11-26 15:42:24


#2539: advance() and distance() for new iterator concepts
------------------------------------+---------------------------------------
 Reporter: debionne_at_[hidden] | Type: Bugs
   Status: new | Milestone: Boost 1.38.0
Component: None | Version: Boost 1.37.0
 Severity: Problem | Keywords:
------------------------------------+---------------------------------------
 I can't find a trace of a problem submitted by Sebastian Redl last year :
 http://lists.boost.org/Archives/boost/2007/09/127785.php

 In brief, the std version of advance() and distance() functions does not
 dispatch accordingly to the traversal_tag. For instance a
 transform_iterator is categorized as std::input_iterator_tag,
 boost::random_access_traversal_tag and the chosen distance()
 implementation is O(n) while O(1) is expected.

 The patch suggested by Sebastian works fine. The only thing is that names
 collides with Boost.Range (which already have boost::distance).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2539>
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:49:59 UTC