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

Static Public Member Functions

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

Static Public Attributes

static constexpr bool has_null = true
 
static constexpr bool always_null = nullness<T>::always_null
 Technically, you could have an optional of an always-null type.
 
static bool has_null
 Does this type have a null value?
 
static bool always_null
 Is this type always null?
 

Member Function Documentation

◆ is_null() [1/2]

template<typename T>
static constexpr bool pqxx::nullness< std::optional< T > >::is_null ( std::optional< T > const & v)
inlinestaticconstexprnoexcept

◆ is_null() [2/2]

static bool pqxx::nullness< std::optional< T >, void >::is_null ( std::optional< T > const & value)
static

Is value a null?

◆ null() [1/2]

template<typename T>
static constexpr std::optional< T > pqxx::nullness< std::optional< T > >::null ( )
inlinestaticconstexpr

◆ null() [2/2]

static std::optional< T > pqxx::nullness< std::optional< 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.

Member Data Documentation

◆ always_null [1/2]

template<typename T>
bool pqxx::nullness< std::optional< T > >::always_null = nullness<T>::always_null
staticconstexpr

Technically, you could have an optional of an always-null type.

◆ always_null [2/2]

bool pqxx::nullness< std::optional< T >, void >::always_null
static

Is this type always null?

◆ has_null [1/2]

template<typename T>
bool pqxx::nullness< std::optional< T > >::has_null = true
staticconstexpr

◆ has_null [2/2]

bool pqxx::nullness< std::optional< T >, void >::has_null
static

Does this type have a null value?


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