且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在保证复制省略的情况下,为什么需要完全定义类?

更新时间:2023-11-13 08:44:22

规则位于 [basic.lval]/9 :

除非另有说明([dcl.type.simple]),否则prvalue必须始终具有完整类型或void类型; ...

Unless otherwise indicated ([dcl.type.simple]), a prvalue shall always have complete type or the void type; ...