24#ifndef MYSQL_STRCONV_ENCODE_STRING_COUNTER_H
25#define MYSQL_STRCONV_ENCODE_STRING_COUNTER_H
82 [[nodiscard]] std::size_t
size()
const {
return m_size; }
102static_assert(!std::copy_constructible<Constructible_string_counter>);
103static_assert(!std::copy_constructible<String_counter>);
104static_assert(std::movable<Constructible_string_counter>);
105static_assert(std::movable<String_counter>);
Class that serves as the target for encode(..., Is_string_target), which never writes anything and on...
Definition: string_counter.h:40
std::size_t m_size
The current size.
Definition: string_counter.h:86
void write(const Is_format auto &format, const auto &object)
Increment the size by the size of the given object.
Definition: string_counter.h:68
void write_raw(const std::string_view &sv)
Increment the size by sv.size().
Definition: string_counter.h:62
String_counter()=default
Construct a new object.
void write(const Is_format auto &format, const std::string_view &sv)
Increment the size by the size of the given string.
Definition: string_counter.h:74
void write_char(int)
Increment the size by 1.
Definition: string_counter.h:65
void advance(std::size_t size)
Increment the size by size.
Definition: string_counter.h:79
std::size_t size() const
Return the current size.
Definition: string_counter.h:82
static constexpr Target_type target_type
Definition: string_counter.h:49
String_counter(String_counter &&) noexcept=default
String_counter(const String_counter &)=delete
String_counter subclass that can be instantiated.
Definition: string_counter.h:97
Constructible_string_counter()=default
CRTP base class providing common helpers needed by String_writer and String_counter,...
Definition: string_target.h:61
void resolve_format_and_write(const Is_format auto &format, const Object_t &object)
Resolve the format, using the rules to deduce format based on default format and parent format,...
Definition: string_target.h:90
Definition: gtid_binary_format_conv.h:252
Definition: gtid_binary_format.h:41
Target_type
Definition: string_target.h:107
noexcept
The return type for any call_and_catch(f, args...) call where f(args...) returns Type.
Definition: call_and_catch.h:76
Define std::hash<Gtid>.
Definition: gtid.h:355