libpqxx 7.9.0
pqxx::byte_char_traits Struct Reference

Custom std::char_trast if the compiler does not provide one. More...

#include <util.hxx>

Inheritance diagram for pqxx::byte_char_traits:

Public Types

using char_type = std::byte
 

Static Public Member Functions

static void assign (std::byte &a, const std::byte &b) noexcept
 
static bool eq (std::byte a, std::byte b)
 
static bool lt (std::byte a, std::byte b)
 
static int compare (const std::byte *a, const std::byte *b, std::size_t size)
 
static size_t length (const std::byte *data)
 Deliberately undefined: "guess" the length of an array of bytes.
 
static const std::byte * find (const std::byte *data, std::size_t size, const std::byte &value)
 
static std::byte * move (std::byte *dest, const std::byte *src, std::size_t size)
 
static std::byte * copy (std::byte *dest, const std::byte *src, std::size_t size)
 
static std::byte * assign (std::byte *dest, std::size_t size, std::byte value)
 
static int_type not_eof (int_type value)
 Declared but not defined: makes no sense for binary data.
 
static std::byte to_char_type (int_type value)
 
static int_type to_int_type (std::byte value)
 
static bool eq_int_type (int_type a, int_type b)
 
static int_type eof ()
 Declared but not defined: makes no sense for binary data.
 

Detailed Description

Custom std::char_trast if the compiler does not provide one.

Needed if the standard library lacks a generic implementation or a specialisation for std::byte. They aren't strictly required to provide either, and libc++ 19 removed its generic implementation.

Member Typedef Documentation

◆ char_type

Member Function Documentation

◆ assign() [1/2]

static void pqxx::byte_char_traits::assign ( std::byte & a,
const std::byte & b )
staticnoexcept

References pqxx::array_separator.

◆ assign() [2/2]

static std::byte * pqxx::byte_char_traits::assign ( std::byte * dest,
std::size_t size,
std::byte value )
static

References pqxx::array_separator.

◆ compare()

static int pqxx::byte_char_traits::compare ( const std::byte * a,
const std::byte * b,
std::size_t size )
static

References pqxx::array_separator.

◆ copy()

static std::byte * pqxx::byte_char_traits::copy ( std::byte * dest,
const std::byte * src,
std::size_t size )
static

References pqxx::array_separator.

◆ eof()

static int_type pqxx::byte_char_traits::eof ( )
static

Declared but not defined: makes no sense for binary data.

◆ eq()

static bool pqxx::byte_char_traits::eq ( std::byte a,
std::byte b )
static

References pqxx::array_separator.

◆ eq_int_type()

static bool pqxx::byte_char_traits::eq_int_type ( int_type a,
int_type b )
static

References pqxx::array_separator.

◆ find()

static const std::byte * pqxx::byte_char_traits::find ( const std::byte * data,
std::size_t size,
const std::byte & value )
static

◆ length()

static size_t pqxx::byte_char_traits::length ( const std::byte * data)
static

Deliberately undefined: "guess" the length of an array of bytes.

◆ lt()

static bool pqxx::byte_char_traits::lt ( std::byte a,
std::byte b )
static

References pqxx::array_separator.

◆ move()

static std::byte * pqxx::byte_char_traits::move ( std::byte * dest,
const std::byte * src,
std::size_t size )
static

References pqxx::array_separator.

◆ not_eof()

static int_type pqxx::byte_char_traits::not_eof ( int_type value)
static

Declared but not defined: makes no sense for binary data.

◆ to_char_type()

static std::byte pqxx::byte_char_traits::to_char_type ( int_type value)
static

◆ to_int_type()

static int_type pqxx::byte_char_traits::to_int_type ( std::byte value)
static

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