zhaoyf
因为c++调用copy constructor时传的就是引用啊,你定义时不加引用就不是copy constructor而是一个带参数constructor了,然后造成这个constructor和系统默认copy constructor的二义性,因此编译通不过。
zhaoyf
因为c++调用copy constructor时传的就是引用啊,你定义时不加引用就不是copy constructor而是一个带参数constructor了,然后造成这个constructor和系统默认copy constructor的二义性,因此编译通不过。