Boost logo

Boost :

Subject: Re: [boost] [iterator][range] BoostIteratorTraversalConcepts-aware boost::advance/distance
From: Edward Diener (eldiener_at_[hidden])
Date: 2017-06-29 03:24:53


On 6/28/2017 4:03 PM, Michel Morin via Boost wrote:
> Hi,
>
> The Boost iterator traversal concepts have not been adopted by the C++ Standard.
> Because of this, some of RandomAccessTraversalIterators (Boost's concepts) are
> treated as InputIterators (Standard's concepts) by the stdlib.
>
> IMHO, Boost.Iterator should provide BoostIteratorTraversalConcepts-aware
> `boost::advance` and `boost::distance` to avoid the inefficiencies. However,
> neither of them are implemented. (Boost.Range has `boost::distance` for
> ranges, but it just calls `std::distance`.)
>
> I'm attaching files that implement `boost::advance` and `boost::distance`.
> Would these functions be useful additions?

Please create a PR.

>
> Regards,
> Michel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk