I do not know what happend when i invoke copy constructor on self. In my opinion, The copy constructor will allocate new memory space for the object, and then copy the data of the old object to the new memory space. So the address will change when i call A(a), but it not.
class A {
public:
A(const A& t) {
std::cout << "sss" << endl;
};
A() {};
};
int main() {
A a;
std::cout << &a << endl;
a = A(a);
std::cout << &a << endl;
}