stdvariant stdvariant it's some kind of old c feature union, but it's type safe and can hold complicated types, not only simple buildin types stdvariant is not allowed to hold references, type void, arrays variant do not use additional memory allocations in heap Empty variant is also not allowed variant can have same type moreSwaps two variant objects if both *this and rhs are valueless by exception, does nothing ; There is a low chance that we will regret including variant in C17, but a high chance that we will regret omitting it This proposal attempts to apply the lessons learned from optional (1) It behaves as below Add an example of multivisitation;
Ltd Aruplab Com