Export (0) Print
Expand All
Expand Minimize

Compiler Error C2621

member 'identifier' of union 'union' has copy constructor

A union member cannot have a copy constructor.

Example

// C2621.cpp
class A
{
   A( const A& );  // A has a copy constructor
};
union U
{
   A a;            // C2621
};
Show:
© 2015 Microsoft