pqxx::forbidden_conversion< TYPE > Struct Template Reference

String traits for a forbidden type conversion. More...

`#include <strconv.hxx>`

Inheritance diagram for pqxx::forbidden_conversion< TYPE >:
[legend]

## Static Public Member Functions

static zview | to_buf (char *, char *, TYPE const &)
static char * | into_buf (char *, char *, TYPE const &)
static TYPE | from_string (std::string_view)
static std::size_t | size_buffer (TYPE const &) noexcept

## Static Public Attributes

static constexpr bool | converts_to_string {false}
static constexpr bool | converts_from_string {false}

## Detailed Description

template<typename TYPE>
struct pqxx::forbidden_conversion< TYPE >

String traits for a forbidden type conversion.

If you have a C++ type for which you explicitly wish to forbid SQL conversion, you can derive a pqxx::string_traits specialisation for that type from this struct. Any attempt to convert the type will then fail to build, and produce an error mentioning oops_forbidden_conversion.

## Member Function Documentation

## from_string()

template<typename TYPE >

static TYPE pqxx::forbidden_conversion< TYPE >::from_string | ( | std::string_view |  | ) |

static

## into_buf()

template<typename TYPE >

static char * pqxx::forbidden_conversion< TYPE >::into_buf | ( | char * | ,
|  | char * | ,
|  | TYPE const & |
| ) |  |

static

## size_buffer()

template<typename TYPE >

static std::size_t pqxx::forbidden_conversion< TYPE >::size_buffer | ( | TYPE const & |  | ) |

static noexcept

## to_buf()

template<typename TYPE >

static zview pqxx::forbidden_conversion< TYPE >::to_buf | ( | char * | ,
|  | char * | ,
|  | TYPE const & |
| ) |  |

static

## Member Data Documentation

## converts_from_string

template<typename TYPE >

constexpr bool pqxx::forbidden_conversion< TYPE >::converts_from_string {false}

static constexpr

## converts_to_string

template<typename TYPE >

constexpr bool pqxx::forbidden_conversion< TYPE >::converts_to_string {false}

static constexpr

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

- strconv.hxx