24#ifndef MYSQL_STRCONV_ENCODE_STRING_TARGET_H
25#define MYSQL_STRCONV_ENCODE_STRING_TARGET_H
50template <
class Format_t,
class Object_t>
60template <
class Self_tp>
72 template <
class Format_t,
class Object_t>
74 :
public std::bool_constant<Can_invoke_encode_impl<Format_t, Object_t>> {
80 template <
class... Args_t>
89 template <
class Object_t>
91 const Object_t &
object) {
98 [[nodiscard]]
Self_t &
self() {
return static_cast<Self_t &
>(*this); }
Top of the hierarchy.
Definition: string_target.h:46
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
Self_tp Self_t
Definition: string_target.h:63
void concat(const Is_format auto &format, const Args_t &...args)
Depending on the subclass, write or compute the size of multiple objects to this String_target.
Definition: string_target.h:81
Concept that holds for String_counter and String_writer.
Definition: string_target.h:111
True if encode_impl can be invoked with the given format type and object type.
Definition: string_target.h:51
uint counter
Definition: mysqlimport.cc:58
Definition: gtid_binary_format_conv.h:252
constexpr auto resolve_format(const Format_t &format, const Object_t &object)
Return the format to pass to the implementation function, given the format and object type passed by ...
Definition: resolve_format.h:165
Definition: gtid_binary_format.h:41
Target_type
Definition: string_target.h:107
void encode_impl(const Gtid_binary_format &format, Is_string_target auto &target, const mysql::gtids::Is_tag auto &tag)
Definition: gtid_binary_format_conv.h:48
Helper type that wraps the varargs of concat in a struct containing a tuple.
Definition: concat_object.h:40
Helper type predicate used by detail::resolve_format.
Definition: string_target.h:74