|
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 () |
| 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. | |
| void | swap (VariantStorage &other) noexcept |
| swap this storage with other. | |
Public Attributes | |
| unsigned char | _data [std::max({sizeof(Ts)...})] |
| aligned storage. | |
| std::size_t | _which = 0 |
| 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.
|
inlineconstexpr |
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.
|
inlinenoexcept |
swap this storage with other.
| other | storage to swap with. |
| unsigned char join::details::VariantStorage< Ts >::_data[std::max({sizeof(Ts)...})] |
aligned storage.
| std::size_t join::details::VariantStorage< Ts >::_which = 0 |
index of the alternative that is currently held by the variant.