不然你怎么使用返回指令创建并返回一个对象而不使用复制构造函数?
How else could you use that return instruction to create and return an object and yet not use the copy constructor?
您不需要使用复制构造函数,并且永远也不需要大汗淋漓地去实现clone方法的那些令人惨不忍睹的细节。
You do not need a copy constructor, and you need never sweat the gory details of implementing a clone method.
具有指针成员且使用默认合成复制构造函数的类具有普通指针的所有缺陷。
Classes that have pointer members and use default synthesized copy control have all the pitfalls of ordinary Pointers.
应用推荐