|

楼主 |
发表于 2020-8-19 17:15:02
|
显示全部楼层
自己找到答案了:
《C++ Primer》上说:
The copy form of initialization is primarily supported for compatibility with C usage. When it can do so, the compiler is permitted (but not obligated) to skip the copy constructor and create the object directly.
复制形式的初始化(即用=号初始化,本人注)主要是为了兼容C的用法的。当这种用法被支持时,编译器被允许(但不被制强)跳过复制构造函数而直接创建该对象。
我想这段话已经回答我的问题了。
感谢楼上诸位,特别是killingme。 |
|