Any of the following disqualifies a class for being an element of a union: having a constructor, having a destructor, having a copy operation.
Otherwise the compiler would not know what constructor/destructor/copy operation to call.
Reference: The C++ Programming Language by Bjarne Stroustrup. Addison-Wesley, 2000. Section:C.8.3
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment