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