
"David Abrahams" <dave@boost-consulting.com> wrote in message news:u1xbgsbhw.fsf@boost-consulting.com... | "Thorsten Ottosen" <nesotto@cs.auc.dk> writes: | | > The trouble in that case would be that my implementation used void* | > underneith and hence has special iterators that does a | > reinterpret_cast. | | Aside: Why reinterpret_cast? Surely static_cast would be a more | restrictive and less alarming choice. ah yes, my mistake. I forgot static cast could do the job. | > A reinterpret_cast appears here and there in the container's implmentation | > too. | | You just need specializations for pointers that do that casting trick, | and a generalized template that doesn't. well, you "just" need specialization of everything, or at least a lot. | > So given that iterators in general are not supported, would you then prefer | > the ptr_ prefix? | | No; I'd prefer if you planned to phase in support for dereferenceable | types in general. it might not be a bad idea. It does begs the question of how to specify arguments. Currently you say ptr_vector<T> to hold T* objects. If any indirectable type should be usable, then I guess we need to switch to indirect_vector<T*> indirect_vector<std::vector<T>::iterator > I have to think a little about how much work it will be; maybe it could wait to the second release? -Thorsten