1 #ifndef A_H 2 #define A_H 3 4 #include <cstdio> 5 #include <memory> 6 7 class A { 8 public: 9 A(int value) : m_a_value(value) {} 10 A(int value, A *client_A) : m_a_value(value), m_client_A(client_A) {} 11 12 virtual ~A() {} 13 14 virtual void doSomething(A &anotherA); 15 16 int Value() { return m_a_value; } 17 18 private: 19 int m_a_value; 20 std::auto_ptr<A> m_client_A; 21 }; 22 23 A *make_anonymous_B(); 24 25 #endif 26