|
Boost : |
Subject: [boost] [smart_ptr] shared_ptr template type
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2009-07-09 10:49:58
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I wonder if it might be better/possible to have a shared_ptr<T> that didn't
assume its corresponding "raw" pointer type was T* but rather T. For
example, what is now a shared_ptr<int> would be specified as a
shared_ptr<int*>. The motivation would be to allow support for other classes
as the "raw" pointer type. For example, I might want to have a
shared_ptr<monitor<T*> > where the monitor<T*> has an operator->() which does
automatic locking/unlocking of a mutex before/after forwarding the
operator->() to the plain T pointer.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkpWA5YACgkQ5vihyNWuA4UQOwCeI7sjr4/pByXIqRtactVfi8fk
MUgAoLmstL+7V5NW+yYNXyDPlVog7VAI
=JE48
-----END PGP SIGNATURE-----
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk