Export (0) Print
Expand All
Expand Minimize

Compiler Error C2622

member 'identifier' of union 'union' has assignment operator

A union member cannot have an assignment operator.

Example

// C2622.cpp
class A
{
   A& operator= ( const A& );  // A's assignment operator
};
union U
{
   A a;                        // C2622
};
Show:
© 2015 Microsoft