File indexing completed on 2024-05-05 05:41:40
0001 class APrivate 0002 { 0003 public: 0004 int i = 3; 0005 }; 0006 0007 class A 0008 { 0009 public: 0010 A() : d(new APrivate()) {} 0011 A(const A &other) : d(new APrivate(*other.d)) {} 0012 ~A() { delete d; } 0013 private: 0014 APrivate *const d; 0015 }; 0016 0017 void test() 0018 { 0019 A a; 0020 A a2; 0021 }