libpqxx
7.0.6
zview.hxx
1
/* Zero-terminated string view.
2
*
3
* DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/stringconv instead.
4
*
5
* Copyright (c) 2000-2020, Jeroen T. Vermeulen.
6
*
7
* See COPYING for copyright license. If you did not receive a file called
8
* COPYING with this source code, please notify the distributor of this
9
* mistake, or contact the author.
10
*/
11
#ifndef PQXX_H_ZVIEW
12
#define PQXX_H_ZVIEW
13
14
#include "pqxx/compiler-public.hxx"
15
16
#include <string_view>
17
18
namespace
pqxx
19
{
21
32
class
zview
:
public
std::string_view
33
{
34
public
:
35
template
<
typename
... Args>
36
explicit
constexpr
zview
(Args &&... args) :
37
std::string_view(std::forward<Args>(args)...)
38
{}
39
41
[[nodiscard]] constexpr
char
const
*
c_str
() const noexcept {
return
data(); }
42
};
43
}
// namespace pqxx
44
45
#endif
pqxx
The home of all libpqxx classes, functions, templates, etc.
Definition:
array.hxx:25
pqxx::zview::c_str
constexpr const char * c_str() const noexcept
Either a null pointer, or a zero-terminated text buffer.
Definition:
zview.hxx:41
pqxx::zview
Marker-type wrapper: zero-terminated std::string_view.
Definition:
zview.hxx:32
pqxx::zview::zview
constexpr zview(Args &&... args)
Definition:
zview.hxx:36
include
pqxx
zview.hxx
Generated by
1.8.17