|
sparrow 1.3.0
|
#include <algorithm>#include <compare>#include <concepts>#include <exception>#include <type_traits>#include <variant>#include "sparrow/config/config.hpp"#include "sparrow/utils/mp_utils.hpp"Go to the source code of this file.
Classes | |
| struct | sparrow::is_nullable< T > |
| struct | sparrow::is_nullable< nullable< T, B > > |
| struct | sparrow::nullable_traits< T > |
| struct | sparrow::nullable_traits< T & > |
| class | sparrow::bad_nullable_access |
| Exception thrown when accessing a null nullable value. More... | |
| struct | sparrow::nullval_t |
| Sentinel type to indicate a nullable value is null. More... | |
| class | sparrow::nullable< T, B > |
| class | sparrow::nullable_variant< T > |
| Variant of nullable types with has_value() convenience method. More... | |
| struct | sparrow::is_nullable_variant< T > |
| struct | sparrow::is_nullable_variant< nullable_variant< T... > > |
| struct | std::basic_common_reference< sparrow::nullable< T, TB >, sparrow::nullable< U, UB >, TQual, UQual > |
Namespaces | |
| namespace | sparrow |
| namespace | sparrow::impl |
| namespace | std |
Concepts | |
| concept | sparrow::nullable_of |
| concept | sparrow::nullable_of_convertible_to |
| concept | sparrow::range_of_nullables |
| concept | sparrow::impl::both_constructible_from_cref |
| Concepts used to disambiguate the nullable class constructors. | |
| concept | sparrow::impl::both_convertible_from_cref |
| concept | sparrow::impl::constructible_from_one |
| concept | sparrow::impl::convertible_from_one |
| concept | sparrow::impl::initializable_from_one |
| concept | sparrow::impl::initializable_from_refs |
| concept | sparrow::impl::assignable_from_one |
| concept | sparrow::impl::assignable_from_refs |
| concept | sparrow::impl::both_constructible_from_cond_ref |
| concept | sparrow::impl::both_convertible_from_cond_ref |
| concept | sparrow::impl::both_assignable_from_cref |
| concept | sparrow::impl::both_assignable_from_cond_ref |
Macros | |
| #define | SPARROW_CONSTEXPR constexpr |
Typedefs | |
| template<class T, class U> | |
| using | sparrow::impl::conditional_ref_t = std::conditional_t<std::is_reference_v<T>, const std::decay_t<U>&, std::decay_t<U>&&> |
Functions | |
| constexpr nullval_t | sparrow::nullval (0) |
| template<class T, class B> | |
| constexpr void | sparrow::swap (nullable< T, B > &lhs, nullable< T, B > &rhs) noexcept |
| Swaps two nullable objects. | |
| template<class T, class B> | |
| constexpr bool | sparrow::operator== (const nullable< T, B > &lhs, nullval_t) noexcept |
| Equality comparison between nullable and nullval_t. | |
| template<class T, mpl::boolean_like B> | |
| constexpr std::strong_ordering | sparrow::operator<=> (const nullable< T, B > &lhs, nullval_t dummy) noexcept |
| Three-way comparison between nullable and nullval_t. | |
| template<class T, class B, class U> requires (!is_nullable_v<U> && mpl::weakly_equality_comparable_with<T, U>) | |
| constexpr bool | sparrow::operator== (const nullable< T, B > &lhs, const U &rhs) noexcept |
| Equality comparison between nullable and regular value. | |
| template<class T, class B, class U> requires (!is_nullable_v<U> && std::three_way_comparable_with<U, T>) | |
| constexpr std::compare_three_way_result_t< T, U > | sparrow::operator<=> (const nullable< T, B > &lhs, const U &rhs) noexcept |
| Three-way comparison between nullable and regular value. | |
| template<class T, class B, class U, class UB> requires (mpl::weakly_equality_comparable_with<T, U>) | |
| constexpr bool | sparrow::operator== (const nullable< T, B > &lhs, const nullable< U, UB > &rhs) noexcept |
| Equality comparison between two nullable objects. | |
| template<class T, class B, std::three_way_comparable_with< T > U, class UB> | |
| constexpr std::compare_three_way_result_t< T, U > | sparrow::operator<=> (const nullable< T, B > &lhs, const nullable< U, UB > &rhs) noexcept |
| Three-way comparison between two nullable objects. | |
| template<class T, mpl::boolean_like B = bool> | |
| constexpr nullable< T, B > | sparrow::make_nullable (T &&value, B &&flag=true) |
| Creates a nullable object with deduced types. | |
| template<std::ranges::range R, typename T = typename std::ranges::range_value_t<R>::value_type> requires (nullable_of<std::ranges::range_value_t<R>, T>) | |
| constexpr void | sparrow::zero_null_values (R &range, const T &default_value=T{}) |
| Sets null values in a range to a default value. | |
| std::ostream & | sparrow::operator<< (std::ostream &os, const nullval_t &) |
Variables | |
| template<class T> | |
| constexpr bool | sparrow::is_nullable_v = is_nullable<T>::value |
| template<class T> | |
| constexpr bool | sparrow::is_nullable_variant_v = is_nullable_variant<T>::value |
| #define SPARROW_CONSTEXPR constexpr |
Definition at line 43 of file nullable.hpp.