"David Abrahams" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > "Fernando Cacciola \(Home\)" <[EMAIL PROTECTED]> writes: > > > Hi! > > > > I'm under the process of getting rid of some of my old > > smart pointers replacing them by shared_ptr<>. > > There is however one idiomatic usage that it's pretty > > hard to locate and edit, so I wondered if shared_ptr<> > > could support it. > > One is initialization from a null pointer value, as in: > > > ... > > > > this one is very useful because its very idiomatic. > > > > The other one, definitely not recommended but which *I* need > > to support because my code if full of it, > > is assignment of a null pointer value as a synonym for reset(), > > as in: > > ... > > > What do you think? > > I think this looks like a job for > > template <class T> > struct my_shared_ptr : shared_ptr<T> > { > ... // additional interface here > }; > Yes, this is what I did actually... I just thought that the addition, -> the initialization from 0, was good enough to be considered as a formal extension.
-- Fernando Cacciola _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost