当下列错误出现时,我正在编译下面的代码。我无法找到原因。错误:工会中不允许复制赋值运算符
typedef union {
struct {
const int j;
} tag;
} X;
int main(){
return 0;
}
error: member `<`anonymous union>::`<`anonymous struct> `<`anonymous union>::tag with copy assignment operator not allowed in union
此代码编译罚款与海湾合作委员会虽然。仅用g ++给出错误。