Boost logo

Boost :

Subject: Re: [boost] [iterator] Silent-but-deadly bug in iterator_facade category
From: Marc Glisse (marc.glisse_at_[hidden])
Date: 2013-05-07 01:32:12


On Tue, 7 May 2013, Nathan Ridge wrote:

> Yes, it's a flaw. The STL unnecessarily conflates iterator traversal
> and iterator value access in its iterator categories. This is why
> Boost has developed, and uses, its own iterator concepts. See [2].

And those concepts are "incompatible" with algorithms written for the
standard concepts, so we are left with 2 choices:
- don't use the STL directly, use the boost implementations instead
- don't use boost iterators (well, a few classes are usable, but not
transform_iterator for instance)

In my experience, the easiest way to handle this painful reference
requirement is to ignore it and pretend that the standard categories are
only about traversal. I've never had anything break because of this.

-- 
Marc Glisse

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