why the defaulted default constructor is deleted for a union or union-like class

前端 未结 0 1152
别跟我提以往
别跟我提以往 2020-12-22 14:11
struct A{
    A(){}
};
union C{
   A a;
   int b = 0;
};
int main(){
    C c;
}

Consider the above code, GC

相关标签:
回答
  • 消灭零回复
提交回复
热议问题