迷茫2017-04-17 13:19:23
Personally, I think that sometimes overloading copy constructors/operators is to show that copy control related functions have been taken into account when creating a class. When the copy control function synthesized by the compiler meets the needs, use =default
You don’t have to write it yourself again. If other data members are added to the class in the future and copy control needs to be customized, there is no need to add copy constructors/operators, but only need to modify the existing ones.
PHP中文网2017-04-17 13:19:23
is equivalent to the last else in
if...else if...else...
. The meaning is the same