Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 1999-12-07 19:40:57

From: Herb Sutter <hsutter_at_[hidden]>
> Greg wrote:
> >I'm not sure whether we have a library issue or not,
> Yes, but the issue is with vector<bool>, not with the iterator requirements.

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

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

> More generally, the container and allocator requirements require T&'s too. To
> fix this whole mess, throughout the library spec you'd need to change a lot of
> hardcoded T&'s to Container::reference or Allocator::reference. Today's library
> uses X::reference piecemeal; it is vestigial. The idea was that allocators and
> iterators and containers were contemplated to perhaps be allowed to be
> proxyable, but that job was never actually finished.

Just because we relax requirements on the iterators doesn't mean
we have to relax them on the containers. I'm wanting to give more
leeway to users of the algorithms, not to implementors of the

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