
On Thu, Jul 16, 2009 at 1:46 PM, Ross Levine<ross.levine@uky.edu> wrote:
I was wondering if boost has considered a smart pointer that is similar to scoped_ptr but supports deep copy semantics. This would be useful in classes which use the pimpl idiom, as a common way to program these classes is with a scoped_ptr or auto_ptr, but then a copy constructor and copy assignment operator needs to be defined.
My common way to program these classes is with shared_ptr actually. Yes, it does require copy ctor and op= if deep copy semantics are needed but that's rare (in my experience anyway) and the benefit of shared_ptr is that you have complete control over the memory allocations, all done in the cpp file completely decoupled from the interface. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode