Serac
0.1
Serac is an implicit thermal strucural mechanics simulation code.
|
Storage abstraction to provide trivial destructor when both variant types are trivially destructible. More...
#include <variant.hpp>
Public Member Functions | |
constexpr | variant_storage (const variant_storage &other) |
Copy constructor for nontrivial types Placement-new is required to correctly initialize the union. More... | |
constexpr | variant_storage (variant_storage &&other) |
Move constructor for nontrivial types Placement-new is required to correctly initialize the union. More... | |
constexpr void | clear () |
Resets the union by destroying the active member. More... | |
constexpr | variant_storage () |
Default constructor Default initializes the first member of the variant. | |
~variant_storage () | |
Destroys the variant by calling the destructor of the active member. | |
Public Attributes | |
int | index_ = 0 |
The index of the active member. | |
union { | |
T0 t0_ | |
T1 t1_ | |
}; | |
Storage abstraction to provide trivial destructor when both variant types are trivially destructible.
T0 | The type of the first variant element |
T1 | The type of the second variant element |
SFINAE | Used to switch between the trivially destructible and not-trivially destructible implementations |
Definition at line 34 of file variant.hpp.
|
inlineconstexpr |
Copy constructor for nontrivial types Placement-new is required to correctly initialize the union.
[in] | other | The variant_storage to copy from |
Definition at line 49 of file variant.hpp.
|
inlineconstexpr |
Move constructor for nontrivial types Placement-new is required to correctly initialize the union.
[in] | other | The variant_storage to move from |
Definition at line 68 of file variant.hpp.
|
inlineconstexpr |
Resets the union by destroying the active member.
Definition at line 86 of file variant.hpp.