Subject: Re: [boost] [smart_ptr] shared_ptr template type
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2009-07-09 13:58:52
-----BEGIN PGP SIGNED MESSAGE-----
On Thursday 09 July 2009, Sid Sacek wrote:
> > I wonder if it might be better/possible to have a shared_ptr<T> that
> > assume its corresponding "raw" pointer type was T* but rather T.
> If I'm not mistaken, the C++0x committee is setting the 'shared_ptr<>'
> class in stone as we speak. I seriously doubt that can be changed this
> late in the game, considering the amount of code that is already using
> this class as-is.
I'm not under any delusions about getting such a change to std::shared_ptr
into c++0x. That doesn't preclude something like this being added to boost
though, under a different name (I'll call it "generalized_shared" for the
moment). Then boost::shared_ptr could be implemented as
class shared_ptr: public generalized_shared<T*>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
-----END PGP SIGNATURE-----