Boost logo

Boost Users :

Subject: Re: [Boost-users] New Iterator Concepts deprecated?
From: Eric Niebler (eniebler_at_[hidden])
Date: 2015-03-22 14:57:27


On 3/19/2015 10:55 PM, Peter Johansson wrote:
> Hi boosters,
>
> I've been looking into the New Iterator Concepts
>
http://www.boost.org/doc/libs/1_57_0/libs/iterator/doc/new-iter-concepts.html
>
> and then I found this comment on boost trac
> https://svn.boost.org/trac/boost/ticket/1296 where dave seven years
> ago wrote: "/the new categories are a dead-end as the standard has
> lifted the reference requirement on forward iterators, so I don't
> plan to implement anything like this. I actually plan to deprecate
> the new categories./"
>
> This was seven years ago and I can't see anything about that the
> concepts have been deprecated, so I just wonder if this statement
> still holds or did the standard take back the reference requirement?

I'm looking at a recent copy of the standard (N3797), and in
[forward.iterators]/1, I see:

> - [...]
> - if `X` is a mutable iterator, `reference` is a reference to `T`; if
> `X` is a const iterator, `reference` is a reference to `const T`.

So I'm not sure what Dave was referring to when he said that the
reference requirement on forward iterators has been dropped.

FWIW, I've been working on getting the standard to *actually* drop the
reference requirement, and doing it in a way that makes proxy iterators
work with the standard algorithms. I've written about it here:

http://ericniebler.com/2015/01/28/to-be-or-not-to-be-an-iterator/
http://ericniebler.com/2015/02/03/iterators-plus-plus-part-1/
http://ericniebler.com/2015/02/13/iterators-plus-plus-part-2/
http://ericniebler.com/2015/03/03/iterators-plus-plus-part-3/

-- 
Eric Niebler
Boost.org
http://www.boost.org

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net