
Daniel James <daniel@calamity.org.uk> writes:
David Abrahams wrote:
There's a specialization of vector<bool, allocator<bool> > in the standard whose iterators iterate over bits and use a proxy reference and therefore are not even conforming forward iterators. vector<bool,A> for A != allocator<bool> is still required to have conforming random-access iterators.
But I don't think that means that you need different iterator types for different allocators. The data is still just raw data, an array of (say) chars instead of bools.
std::iterator_traits<std::vector<bool>::iterator>::reference is different from std::iterator_traits<std::vector<bool,A>::iterator>::reference for all A != std::allocator<bool> Therefore std::vector<bool>::iterator is different from std::vector<bool,A>::iterator for all A != std::allocator<bool> QED -- Dave Abrahams Boost Consulting www.boost-consulting.com