libpqxx
The C++ client library for PostgreSQL
pqxx::internal::integer_string_traits< T > Struct Template Reference

String traits for builtin integer types. More...

#include <conversions.hxx>

Static Public Member Functions

static PQXX_LIBEXPORTfrom_string (std::string_view text, ctx={})
 
static PQXX_LIBEXPORT std::string_view to_buf (std::span< char > buf, T const &value, ctx c={})
 
static constexpr PQXX_INLINE_ONLY std::size_t size_buffer (T const &) noexcept
 

Detailed Description

template<pqxx::internal::integer T>
struct pqxx::internal::integer_string_traits< T >

String traits for builtin integer types.

This does not cover bool or (unlike std::integral) the char types.

Once upon a time this was a partial specialisation of string_traits for the pqxx::internal::integer concept, but MSVC 2026 had a mysterious problem with that (see #1160). So, we had to revert to a much clunkier way of creating those specialisations.

Member Function Documentation

◆ from_string()

template<pqxx::internal::integer TYPE>
TYPE pqxx::internal::integer_string_traits< TYPE >::from_string ( std::string_view  text,
ctx  c = {} 
)
static

◆ size_buffer()

template<pqxx::internal::integer T>
static constexpr PQXX_INLINE_ONLY std::size_t pqxx::internal::integer_string_traits< T >::size_buffer ( T const &  )
inlinestaticconstexprnoexcept

◆ to_buf()

template<pqxx::internal::integer T>
std::string_view pqxx::internal::integer_string_traits< TYPE >::to_buf ( std::span< char >  buf,
T const &  value,
ctx  c = {} 
)
inlinestatic

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