1 #if !defined(PQXX_CONCAT_HXX)
2 # define PQXX_CONCAT_HXX
5 # include <string_view>
7 # include "pqxx/strconv.hxx"
12 template<
typename TYPE>
16 PQXX_ASSUME(next >= here);
30 template<
typename... TYPE>
31 [[nodiscard]]
inline std::string
concat(TYPE... item)
38 char *
const data{buf.data()};
40 char *end = data + std::size(buf);
43 buf.resize(static_cast<std::size_t>(here - data));
std::string concat(TYPE...item)
Efficiently combine a bunch of items into one big string.
Definition: concat.hxx:31
Internal items for libpqxx' own use. Do not use these yourself.
Definition: encodings.cxx:32
std::size_t size_buffer(TYPE const &...value) noexcept
Estimate how much buffer space is needed to represent values as a string.
Definition: strconv.hxx:526
static char * into_buf(char *begin, char *end, TYPE const &value)
Write value's string representation into buffer at begin.
void render_item(TYPE const &item, char *&here, char *end)
Convert item to a string, write it into [here, end).
Definition: concat.hxx:13