14 #include "pqxx/compiler-public.hxx" 16 #include <string_view> 32 class zview :
public std::string_view
35 constexpr
zview() noexcept =
default;
38 constexpr
zview(
const char text[], std::ptrdiff_t len) :
39 std::string_view{text,
static_cast<std::size_t
>(len)}
43 constexpr
zview(
char text[], std::ptrdiff_t len) :
44 std::string_view{text,
static_cast<std::size_t
>(len)}
47 template<
typename... Args>
48 explicit constexpr
zview(Args &&... args) :
49 std::string_view(
std::forward<Args>(args)...)
53 [[nodiscard]] constexpr
char const *
c_str() const noexcept {
return data(); }
constexpr zview() noexcept=default
Marker-type wrapper: zero-terminated std::string_view.
Definition: zview.hxx:32
constexpr zview(const char text[], std::ptrdiff_t len)
Convenience overload: construct using pointer and signed length.
Definition: zview.hxx:38
constexpr char const * c_str() const noexcept
Either a null pointer, or a zero-terminated text buffer.
Definition: zview.hxx:53
constexpr zview(char text[], std::ptrdiff_t len)
Convenience overload: construct using pointer and signed length.
Definition: zview.hxx:43
The home of all libpqxx classes, functions, templates, etc.
Definition: array.hxx:25
constexpr zview(Args &&... args)
Definition: zview.hxx:48