
I've found a use for (2) but a better name for that use case would be cloning_ptr or something. Essentially the point was to avoid manually writing copy constructors/assignment/destructors when I needed to hold POD types by pointer. so something like: struct c_lib_struct; c_lib_struct * new_c_lib_struct(..); c_lib_struct * copy_c_lib_struct(c_lib_struct *); cloning_ptr<c_lib_struct>(new_c_lib_struct(..),copy_c_lib_struct,free_c_lib_struct); Though not quite - took a couple of shortcuts ;-) -----Original Message----- From: boost-bounces@lists.boost.org on behalf of Anand Shankar Sent: Sat 3/24/2007 2:03 PM To: boost@lists.boost.org Subject: [boost] smart_ptr: Helper to ease handling objects from a classheirarchy 2) The assignment operator doesn't transfer the ownership rights, but clones the object using the Clone_polcy. This allows using the copy constructor or a virtual clone function in the class heirarchy.