|
variant
A type safe generalized union type
|
A templated generalized union. More...
#include <variant_storage.hpp>
A templated generalized union.
Represents the storage for a variant. Use a generalized union to automatically take care of alignment issues.
Provides a free function get to obtain the i-th element, acts like std::get(tuple). Notice that this class is very limited by its own nature, it can not support direct asssignment (only assignment to a specific sub element). It supports in place construction, by passing a std::integral_constant tag to specify the actual type that the user wants to construct.
For maximum genericity, having the same type multiple times in the parameter list is allowed, but the user has still to take care to access the type through the same index.
This class is meant to be used only by variant, users must be extremely careful to use this class copy constructor, assignment operator and destructor.
1.8.9.1