« Return to Thread: [smart_ptr] shared_ptr template type

[smart_ptr] shared_ptr template type

by Frank Mori Hess :: Rate this Message:

Reply to Author | View in Thread

-----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-----
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

 « Return to Thread: [smart_ptr] shared_ptr template type