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

Static Public Member Functions

static char * into_buf (char *begin, char *end, std::variant< T... > const &value)
static zview to_buf (char *begin, char *end, std::variant< T... > const &value)
static std::size_t size_buffer (std::variant< T... > const &value) noexcept
static std::variant< T... > from_string (std::string_view)=delete

Static Public Attributes

static constexpr bool converts_to_string
static constexpr bool converts_from_string
 Is conversion from string_view to TYPE supported?

Member Function Documentation

◆ from_string()

template<typename... T>
std::variant< T... > pqxx::string_traits< std::variant< T... > >::from_string ( std::string_view )
staticdelete

There's no from_string for std::variant. We could have one with a rule like "pick the first type which fits the value," but we'd have to look into how natural that API feels to users.

Member Data Documentation

◆ converts_from_string

bool pqxx::string_traits< std::variant< T... > >::converts_from_string
staticconstexpr

Is conversion from string_view to TYPE supported?

When defining your own conversions, specialise this as true to indicate that your string traits support from_string.

◆ converts_to_string

template<typename... T>
bool pqxx::string_traits< std::variant< T... > >::converts_to_string
staticconstexpr
Initial value:
{
static constexpr bool converts_to_string
Is conversion from TYPE to strings supported?
Definition strconv.hxx:159

The documentation for this struct was generated from the following file:
  • /builddir/build/BUILD/libpqxx-7.10.1-build/libpqxx-7.10.1/redhat-linux-build/include/pqxx/internal/conversions.hxx