From: Herb Sutter (hsutter_at_[hidden])
Date: 1999-12-07 18:46:41
>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 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>.
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.
In Dublin, Dave Abrahams floated the idea of creating a new set of
ProxyableContainer requirements. This is possible, but as yet no one has
volunteered to write them.
--- Herb Sutter (mailto:hsutter_at_[hidden]) CTO, PeerDirect Inc. (http://www.peerdirect.com) Head of Delegation (Canada), ISO SC22/WG21 (ISO C++ standards committee) Editor-in-Chief, C++ Report (http://www.creport.com) Moderator, comp.lang.c++.moderated (news:comp.lang.c++.moderated)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk