|
join 1.0
lightweight network framework library
|
helper class representing a variant storage in order to be able to disable default/copy/move constructors/operators. More...
#include <variant.hpp>
Public Member Functions | |
| constexpr | VariantStorage () noexcept |
| default constructor. | |
| constexpr | VariantStorage (const VariantStorage &other) |
| copy constructor. | |
| constexpr | VariantStorage (VariantStorage &&other) noexcept |
| move constructor. | |
| template<std::size_t I, typename... Args> | |
| constexpr | VariantStorage (in_place_index_t< I >, Args &&... args) |
| constructs a variant storage with the alternative T specified by the index I. | |
| ~VariantStorage () | |
| destroy the VariantStorage instance. | |
| constexpr VariantStorage & | operator= (const VariantStorage &other) |
| copy assignment. | |
| constexpr VariantStorage & | operator= (VariantStorage &&other) noexcept |
| move assignment. | |
| constexpr void * | storage () |
| get storage address. | |
| constexpr const void * | storage () const |
| get storage address. | |
Public Attributes | |
| std::aligned_union< std::max({sizeof(Ts)...}), Ts... >::type | _data |
| aligned storage. | |
| std::size_t | _which = sizeof... (Ts) - 1 |
| index of the alternative that is currently held by the variant. | |
helper class representing a variant storage in order to be able to disable default/copy/move constructors/operators.
|
inlineconstexprnoexcept |
default constructor.
|
inlineconstexpr |
copy constructor.
| other | object to copy. |
|
inlineconstexprnoexcept |
move constructor.
| other | object to move. |
|
inlineexplicitconstexpr |
constructs a variant storage with the alternative T specified by the index I.
| args | arguments to initialize the contained value with. |
|
inline |
destroy the VariantStorage instance.
|
inlineconstexpr |
copy assignment.
| other | object to copy. |
|
inlineconstexprnoexcept |
move assignment.
| other | object to move. |
|
inlineconstexpr |
get storage address.
|
inlineconstexpr |
get storage address.
| std::aligned_union<std::max({sizeof(Ts)...}),Ts...>::type join::details::VariantStorage< Ts >::_data |
aligned storage.
| std::size_t join::details::VariantStorage< Ts >::_which = sizeof... (Ts) - 1 |
index of the alternative that is currently held by the variant.