class 생성시 자동으로 만들어지는 것들

class Empty {
public: Empty() {} // constructor (only if there is no other ctor)
~Empty() {} // only in derived classes if base class has dtor
Empty(const Empty& rhs) { // copy constructor foreach non-static member m: m(rhs.m); } Empty& operator=(const Empty& rhs) { // assignment operator foreach non-static member m: m = rhs.m; }
Empty* operator&() { return this; } // address-of operators
const Empty* operator&() const { return this; } };

Comments