[checked_delete] pimpl with scoped_ptr<T>

Hello, This is my first post regarding boost, I hope I am sending it to the right list. I have a question regarding the use of scoped_ptr versus shared_ptr: I am trying to use scoped_ptr<Impl> to implement the "Pimpl" idiom in order to hide the Impl definition from the user. Since my class is not copyable I thought using a scoped_ptr was better suited than a shared_ptr. So, something like this: class Impl; class MyClass { scoped_ptr<Impl> m_pImpl; ... ... }; When compiling client code, I see a checked_delete error. Reading the blurb about checked_delete this makes sense to me and I am able to work around the error by putting an explicit destructor declaration in MyClass. But, I don't see any error if I use a smart_ptr instead of a scoped_ptr. Why is the requirement about not deleting an incomplete type any different between scoped_ptr and shared_ptr? Thanks, Herve Alexanian Sonics, inc.
participants (1)
-
Herve Alexanian