erratum for GotW #62
Sutter's page for the guru question GotW #62 reads:
"... this is not so good if Y is a Pimpl, for example, and the whole point is to hide Y's definition from clients of X2".
If you use a forward-decl. for Y you don't need to show around the def. for Y
boost::scoped_ptryou must provide an empty implementation of the X2-destructor because the default generated destructor would leak memory. See X2.h and X2.C. (Björn Karlsson, Beyond the Standard Library)
when using a
boost::shared_ptranything works right out of the box. (Scott Meyers, Efficient C++, 3rd edition)