sparrow 0.9.0
|
Variant of nullable types with has_value() convenience method. More...
#include <nullable.hpp>
Public Types | |
using | base_type = std::variant<T...> |
Public Member Functions | |
constexpr | nullable_variant (const nullable_variant &)=default |
constexpr | nullable_variant (nullable_variant &&) noexcept=default |
constexpr nullable_variant & | operator= (const nullable_variant &) |
Copy assignment operator. | |
constexpr nullable_variant & | operator= (nullable_variant &&) noexcept |
Move assignment operator. | |
constexpr | operator bool () const |
Conversion to bool indicating non-null state. | |
constexpr bool | has_value () const |
Checks whether the active alternative contains a valid value. | |
Variant of nullable types with has_value() convenience method.
This class extends std::variant to work specifically with nullable types, providing a uniform has_value() interface across all alternative types.
T | Pack of nullable types that can be stored in the variant |
Definition at line 1075 of file nullable.hpp.
using sparrow::nullable_variant< T >::base_type = std::variant<T...> |
Definition at line 1079 of file nullable.hpp.
|
constexprdefault |
|
constexprdefaultnoexcept |
|
constexpr |
Checks whether the active alternative contains a valid value.
Definition at line 1408 of file nullable.hpp.
|
explicitconstexpr |
Conversion to bool indicating non-null state.
Definition at line 1401 of file nullable.hpp.
|
constexpr |
Copy assignment operator.
rhs | Source variant to copy from |
Definition at line 1385 of file nullable.hpp.
|
constexprnoexcept |
Move assignment operator.
rhs | Source variant to move from |
Definition at line 1393 of file nullable.hpp.