libpqxx
The C++ client library for PostgreSQL
pqxx::all_null< TYPE, null_value > Struct Template Reference

Nullness traits describing a type whose values are always null. More...

#include <strconv.hxx>

Static Public Member Functions

static constexpr PQXX_PURE bool is_null (TYPE const &) noexcept
 Is the given TYPE value a null? More...
 
static constexpr PQXX_PURE TYPE null ()
 Return a sample null value. Requires TYPE to be default-constructible. More...
 

Static Public Attributes

static constexpr bool has_null = true
 Does TYPE have a null value? More...
 
static constexpr bool always_null = true
 Is TYPE always null? More...
 

Detailed Description

template<typename TYPE, TYPE null_value>
struct pqxx::all_null< TYPE, null_value >

Nullness traits describing a type whose values are always null.

If you're writing a nullness specialisation for such a type, you can optionally derive it from this type to save yourself a bit of code.

The second template parameter specifies a compile-time constant null value of this type.

Member Function Documentation

◆ is_null()

template<typename TYPE , TYPE null_value>
static constexpr PQXX_PURE bool pqxx::all_null< TYPE, null_value >::is_null ( TYPE const &  )
inlinestaticconstexprnoexcept

Is the given TYPE value a null?

◆ null()

template<typename TYPE , TYPE null_value>
static constexpr PQXX_PURE TYPE pqxx::all_null< TYPE, null_value >::null ( )
inlinestaticconstexpr

Return a sample null value. Requires TYPE to be default-constructible.

Member Data Documentation

◆ always_null

template<typename TYPE , TYPE null_value>
constexpr bool pqxx::all_null< TYPE, null_value >::always_null = true
staticconstexpr

Is TYPE always null?

◆ has_null

template<typename TYPE , TYPE null_value>
constexpr bool pqxx::all_null< TYPE, null_value >::has_null = true
staticconstexpr

Does TYPE have a null value?


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