Boost logo

Boost :

Subject: Re: [boost] [iterator] Silent-but-deadly bug in iterator_facade category
From: Dave Abrahams (dave_at_[hidden])
Date: 2013-05-08 00:51:51

on Tue May 07 2013, Gabriel Redner <> 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.

It might be an input iterator or an output iterator, but it's not a
forward iterator.

> 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?

No, it's strictly correct.

Dave Abrahams

Boost list run by bdawes at, gregod at, cpdaniel at, john at