Compiler Error C2570
'identifier' : union cannot have base classes
A union derives from a class, structure, or union. This is not allowed. Declare the derived type as a class or structure instead.
The following sample generates C2570:
// C2570.cpp
// compile with: /c
class base {};
union hasPubBase : public base {}; // C2570
union hasNoBase {}; // OK
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for