是否可以在我自己的默认ctor定义中调用聚合初始化?
struct X { int x,y,z,p,q,r; X(): x{},y{},z{},p{},q{},r{} { } // cumbersome //X(): X{} { } // the idea is nice but doesn't compile };
我现在在ctor体中使用memset(this,sizeof(* this)).