Boost logo

Boost :

Subject: Re: [boost] [iterator] Silent-but-deadly bug in iterator_facade category
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2013-05-07 11:16:47


On Tue, May 7, 2013 at 7:58 AM, Gabriel Redner <gredner_at_[hidden]> wrote:

> Hi folks,
>
> Stephan T. Lavavej:
> > 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,
>
> If I'm reading this right, then an iterator whose 'reference' is not a
> reference is not an std iterator at all.
>
> If so, then my question (not necessarily to you, but to everyone)
> becomes: why does the Iterator library tag such an iterator with
> std::input_iterator_tag? Isn't this strictly wrong?
>

You snipped the relevant context: The above applies to ForwardIterators,
not to InputIterators or OutputIterators.

[...]

- Jeff


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