There's no real null for std::string_view
.
More...
Static Public Member Functions | |
static bool | is_null (std::string_view const &value) |
Is value a null? | |
static std::string_view | null () |
Return a null value. | |
![]() | |
static constexpr bool | is_null (std::string_view const &) noexcept |
Does a given value correspond to an SQL null value? | |
Static Public Attributes | |
static bool | has_null |
Does this type have a null value? | |
static bool | always_null |
Is this type always null? | |
![]() | |
static constexpr bool | has_null |
Does TYPE have a "built-in null value"? | |
static constexpr bool | always_null |
Are all values of this type null? | |
There's no real null for std::string_view
.
I'm not sure how clear-cut this is: a string_view
may have a null data pointer, which is analogous to a null char
pointer.
|
staticnodiscard |
Return a null value.
Don't use this in generic code to compare a value and see whether it is null. Some types may have multiple null values which do not compare as equal, or may define a null value which is not equal to anything including itself, like in SQL.