Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-07-03 02:32:06


Thomas Witt <witt_at_[hidden]> writes:

> John,
>
> On Wednesday 02 July 2003 02:34, John R. Bandela wrote:
>> I was playing with the new iterator adapters in the sandbox. As I was
>> looking at filter_iterator, I found that it allows user code to increment
>> it like a random access iterator. Here is an example that compiled on VC
>> 7.1
>
> I've checked in a fix for this. Static asserts make the instantiation of
> iterator_adaptors members fail depending on the iterator category. You may
> want to try it, though I don't have access to VC until tomorrow, so it is not
> guaranteed to work.

I guess with the new categories that might be OK. With the old
categories it was neccessary to allow operations which didn't
correspond to the category so that users could build, e.g., random
traversal readable rvalue iterators (had to be labeled as input
iterator). We should take care that we're not disallowing people from
building useful iterators with capabilities that aren't accounted for
by our categories.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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