This type of design is known as a discriminated union or labeled union . You can use Google for the "C ++ discinated union" to see some examples and approaches to this type of design.
A C union ++. , union union. union , ++ 11 , POD ( no std::string).
, , , (, PrintTo). ( , , , PrintTo union, switch TokenType, -OO.)
A union - , , , (no vtable). - , .
, Boost.Variant ++- .