Compiler Error C2623
member 'identifier' of union 'union' has destructor
A union member cannot have a destructor.
The following sample generates C2623:
// C2623.cpp
class A {
~A(); // A has a destructor
};
union U {
A a; // C2623
};
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
member 'identifier' of union 'union' has destructor
A union member cannot have a destructor.
The following sample generates C2623:
// C2623.cpp
class A {
~A(); // A has a destructor
};
union U {
A a; // C2623
};