libpqxx
7.0.1
|
Marker-type wrapper: zero-terminated std::string_view
.
More...
#include <zview.hxx>
Public Member Functions | |
template<typename... Args> | |
constexpr | zview (Args &&... args) |
constexpr char const * | c_str () const noexcept |
Either a null pointer, or a zero-terminated text buffer. More... | |
Marker-type wrapper: zero-terminated std::string_view
.
When you construct a zview, you are promising that the underlying string is zero-terminated. It otherwise behaves exactly like a std::string_view. The terminating zero is not "in" the string, so it does not count as part of the view's length.
The added guarantee lets the view be used as a C-style string, which often matters since libpqxx builds on top of a C library. For this reason, zview also adds a c_str
method.
|
explicit |
|
noexcept |
Either a null pointer, or a zero-terminated text buffer.
Referenced by pqxx::result::column_number(), pqxx::connection::connection(), pqxx::connection::encrypt_password(), pqxx::transaction_base::exec_prepared(), pqxx::connection::prepare(), and pqxx::connection::unesc_raw().