
Hi Dave, "Dave Harris" <brangdon@cix.compulink.co.uk> wrote in message news:memo.212883@cix.compulink.co.uk... | In-Reply-To: <1256163046.20040926162826@topmail.sk> | I'm very dubious about using: | | vec.begin()->bar(); | | instead of: | | (*vec.begin())->bar(); | | It means that ptr_vector<T> is not syntactically a drop-in replacement for | vector<T *> or vector<shared_ptr<T> >. true. | Won't that make it unnecessarily | difficult to "upgrade" existing classes, and harder to switch back again | should the need arise? It has never been the intention to support a path of "upgrade". The semantics are very different from vector<shared_ptr<T> > and ptr_vector<T>. The semantics are closer to vector<T> when it comes to "copying". | Doesn't it also obscure what is going on? It seems | a fundamentally wrong notation to me. The indirected interface was made for a number of reasons, among others - to hide the pointers so to protect against pointer manipolation - to remove the obscure syntax of vector<T*>. - to provide some interface closeness to vector<T>. If you want the old syntax, you just call ptr_begin(): (vec.ptr_begin())->bar(); br Thorsten