libpqxx
The C++ client library for PostgreSQL
 
Loading...
Searching...
No Matches
pqxx::nullness< std::variant< T... > > Struct Template Reference

Static Public Member Functions

static constexpr bool is_null (std::variant< T... > const &value) noexcept
 
static constexpr std::variant< T... > null ()=delete
 
static bool is_null (std::variant< T... > const &value)
 Is value a null?
 
static std::variant< T... > null ()
 Return a null value.
 

Static Public Attributes

static constexpr bool has_null = (nullness<T>::has_null or ...)
 
static constexpr bool always_null = (nullness<T>::always_null and ...)
 
static bool has_null
 Does this type have a null value?
 
static bool always_null
 Is this type always null?
 

Member Function Documentation

◆ null() [1/2]

static std::variant< T... > pqxx::nullness< std::variant< T... >, void >::null ( )
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.

◆ null() [2/2]

template<typename... T>
static constexpr std::variant< T... > pqxx::nullness< std::variant< T... > >::null ( )
staticconstexprdelete

It would be technically possible to have a null in the case where just one of the types has a null, but it gets complicated and arbitrary.


The documentation for this struct was generated from the following file: