摘要:
#include <memory>class X{public: virtual void f() = 0; virtual void g() = 0; virtual ~X() { printf("~X\n");}};class X_impl: public X{private: X_impl(){}; public: ~X_impl(){printf("~X_impl\n");}; virtual void f() { printf("X_impl.f()\n"); } virtual void g() { print 阅读全文