C++11 gave us the possibility to use non-POD types within unions. E.g.
If you use these kind of unions you are mostly on your own, e.g. concerning deletion of union objects and how to determine what the default value will be. A note in the C++ standard explains this (9.5/2): "If any non-static data member of a union has a non-trivial default constructor (12.1), copy constructor (12.8), move constructor (12.8), copy assignment operator (12.8), move assignment operator (12.8), or destructor (12.4), the corresponding member function of the union must be user-provided or it will be implicitly deleted (8.4.3) for the union."