28 Apr
2005
28 Apr
'05
2:09 p.m.
Jeff Flinn wrote:
A::A( const A::A& a ):mPimpl( new Impl( *a.mPimpl ) ){} and don't forget operator=; You get the deep copy semantics that your looking for don't you?
Then, whats the benefit here over using a plain pointer or std::auto_ptr? The goal of using a smart pointer with deep copy semantics is that you *dont* have to write those stuff by yourself.
I'd think scoped_ptr works above as well.
Again, scoped_ptr is noncopyable, and see above. :] --David