|
sparrow 2.6.0
C++20 idiomatic APIs for the Apache Arrow Columnar Format
|
Variant of nullable types with has_value() convenience method. More...
#include <nullable.hpp>
Public Types | |
| using | base_type = std::variant<T...> |
Public Member Functions | |
| template<class U, mpl::boolean_like B> requires ((std::same_as<nullable<U, B>, T> || ...)) | |
| constexpr | nullable_variant (const nullable< U, B > &value) |
| template<class... U> requires impl::materializable_into<nullable_variant<U...>, nullable_variant<T...>> | |
| constexpr | nullable_variant (const nullable_variant< U... > &rhs) |
| Converting constructor from another nullable variant. | |
| template<class... U> requires impl::materializable_into<nullable_variant<U...>, nullable_variant<T...>> | |
| constexpr nullable_variant & | operator= (const nullable_variant< U... > &rhs) |
| Converting assignment operator from another nullable variant. | |
| 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 1241 of file nullable.hpp.
| using sparrow::nullable_variant< T >::base_type = std::variant<T...> |
Definition at line 1245 of file nullable.hpp.
|
inlineconstexpr |
|
inlineconstexpr |
Converting constructor from another nullable variant.
Converts each alternative to its owning counterpart, so a variant of references or views (e.g. array_traits::const_reference) converts to a variant of owned values (e.g. array_traits::value_type). Only available when every alternative of the source has exactly one owning counterpart among T (see impl::materialized).
| U | Alternative types of the source variant |
| rhs | Variant to convert |
Definition at line 1270 of file nullable.hpp.
|
constexprdefault |
|
constexprdefaultnoexcept |
|
constexpr |
Checks whether the active alternative contains a valid value.
Definition at line 1620 of file nullable.hpp.
|
explicitconstexpr |
Conversion to bool indicating non-null state.
Definition at line 1613 of file nullable.hpp.
|
constexpr |
Copy assignment operator.
| rhs | Source variant to copy from |
Definition at line 1597 of file nullable.hpp.
|
inlineconstexpr |
Converting assignment operator from another nullable variant.
See the converting constructor for the conditions under which the conversion is available.
| U | Alternative types of the source variant |
| rhs | Variant to convert |
Definition at line 1289 of file nullable.hpp.
|
constexprnoexcept |
Move assignment operator.
| rhs | Source variant to move from |
Definition at line 1605 of file nullable.hpp.