C++ Actor Framework 0.18
|
A variant represents always a valid value of one of the types Ts...
.
More...
#include <variant.hpp>
Public Types | |
using | types = detail::type_list< Ts... > |
using | type0 = typename detail::tl_at< types, 0 >::type |
Public Member Functions | |
template<class U > | |
variant (U &&arg) noexcept(std::is_rvalue_reference< U && >::value &¬hrow_move_assign) | |
variant (variant &&other) noexcept(nothrow_move_construct) | |
variant (const variant &other) | |
variant & | operator= (const variant &other) |
variant & | operator= (variant &&other) noexcept(nothrow_move_assign) |
template<class U > | |
variant & | operator= (U &&arg) noexcept(nothrow_move_assign) |
constexpr size_t | index () const |
bool | valueless_by_exception () const |
Static Public Attributes | |
static constexpr int | max_type_id = sizeof...(Ts) - 1 |
Stores the ID for the last type. | |
static constexpr bool | nothrow_move_construct |
Stores whether all types are nothrow constructible. | |
static constexpr bool | nothrow_move_assign |
Stores whether all types are nothrow assignable and constructible. | |
Related Functions | |
(Note that these are not member functions.) | |
template<class... Ts> | |
bool | operator== (const variant< Ts... > &x, const variant< Ts... > &y) |
template<class... Ts> | |
bool | operator!= (const variant< Ts... > &x, const variant< Ts... > &y) |
template<class... Ts> | |
bool | operator< (const variant< Ts... > &x, const variant< Ts... > &y) |
template<class... Ts> | |
bool | operator> (const variant< Ts... > &x, const variant< Ts... > &y) |
template<class... Ts> | |
bool | operator<= (const variant< Ts... > &x, const variant< Ts... > &y) |
template<class... Ts> | |
bool | operator>= (const variant< Ts... > &x, const variant< Ts... > &y) |
A variant represents always a valid value of one of the types Ts...
.
|
staticconstexpr |
Stores whether all types are nothrow assignable and constructible.
We need to check both, since assigning to a variant results in a move-construct unless the before and after types are the same.
|
staticconstexpr |
Stores whether all types are nothrow constructible.