variant


code
Syntax [crayon-5cbc17a78bd0b413799060/] std::variant is a modern, safer alternative to the old unions. What are the differences? std::variant is type-safe: the variant knows what type it currently holds – but needs more memory space in order to do so std::variant calls the destructor of the object when it changes its type […]

Library feature: std::variant