41class ValueBuilder
final {
47 using ContainerType = impl::MutableValueWrapper;
62 ValueBuilder(
const ValueBuilder& other);
64 ValueBuilder(ValueBuilder&& other);
65 ValueBuilder& operator=(
const ValueBuilder& other);
67 ValueBuilder& operator=(ValueBuilder&& other);
74 ValueBuilder(std::nullptr_t)
78 ValueBuilder(
const char* str);
79 ValueBuilder(
char* str);
80 ValueBuilder(
const std::string& str);
81 ValueBuilder(std::string_view str);
83 ValueBuilder(
unsigned int t);
84 ValueBuilder(uint64_t t);
85 ValueBuilder(int64_t t);
86 ValueBuilder(
float t);
87 ValueBuilder(
double t);
93 typename = std::enable_if_t<
94 !std::is_same_v<std::decay_t<T>, ValueBuilder> && !std::is_same_v<std::decay_t<T>,
Value> &&
95 !std::is_same_v<std::decay_t<T>, std::string>>>
97 : ValueBuilder(DoSerialize(std::forward<T>(t)))
111 utils::StrongTypedefOps Ops,
112 typename Enable = std::enable_if_t<utils::IsStrongTypedefLoggable(Ops)>>
113 ValueBuilder
operator[](utils::StrongTypedef<Tag, std::string, Ops> key);
185 class EmplaceEnabler {};
189 ValueBuilder(EmplaceEnabler, impl::MutableValueWrapper)
noexcept;
193 enum class CheckMemberExists { kYes, kNo };
195 explicit ValueBuilder(impl::MutableValueWrapper)
noexcept;
197 static void Copy(impl::Value& to,
const ValueBuilder& from);
198 static void Move(impl::Value& to, ValueBuilder&& from);
200 impl::Value& AddMember(std::string_view key, CheckMemberExists);
202 template <
typename T>
203 static Value DoSerialize(T&& t);
205 impl::MutableValueWrapper value_;
254std::enable_if_t<meta::kIsUniqueMap<T> && std::is_convertible_v<
typename T::key_type, std::string>,
Value>