Unexpected const reference behavior
问题 #include <iostream> class A { public: A(){ cerr << "A Constructor" << endl; } ~A(){ cerr << "A Destructor" << endl; } A(const A &o){ cerr << "A Copy" << endl; } A& operator=(const A &o){ cerr << "A Assignment" << endl; return *this; } }; class B : public A { public: B() : A() { cerr << "B Constructor" << endl; } ~B(){ cerr << "B Destructor" << endl; } private: B(const B &o) : A() { cerr << "B Copy" << endl; } B& operator=(const B &o){ cerr << "B Assignment" << endl; return *this; } }; int