Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 1999-12-08 00:08:31


Greg wrote:
> But vector<bool> can't be fixed, and can't be killed either.

I think I disagree with both of those statements (vendors just need some
hand-holding, so they can see how to accomodate existing uses of
vector<bool>), but it's beside the point.

>> >but given that we
>> >have vector<bool> we will need to fix the ForwardIterator
>> >requirements so that vector<bool>::interator conforms. That
>> >fix might well apply to GGCL iterators.
>>
>> Unfortunately, this is impossible. The main reason this iterator requirements
>> change will never happen is that relaxing iterator requirements would remove
>> guarantees that conforming programs are now allowed to depend upon -- i.e.,
it
>> would break a lot of existing code. For example, I know of commercial
>> implementations of the standard library where some algorithms quite rightly
>> assume the T&'s and won't compile with vector<bool>.
>
> I don't mind breaking libraries if it will help users, and I suspect
> that such libraries will eventually cone afoul of their users, if not
> the standard.

Nobody is suggesting breaking anything. Jeremy's suggestion is to provide
something which looks very much like an iterator but in fact is not. Whether
or not it is worth providing this bit of syntactic sugar at the cost of
possible confusion and abuse is a question we need to decide.

I'd like to suggest once again that someone rigorously define the
requirements of a ProxyIterator and ProxyContainer... someone who cares
about the issue (Greg?). The only way we'll know the real-world impact of
relaxing the current requirements is if we get some experience programming
to a different set of requirements.

-Dave


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