Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

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
© 2015 Microsoft