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) : ValueBuilder
() {}
76 ValueBuilder(
const char* str);
77 ValueBuilder(
char* str);
78 ValueBuilder(
const std::string& str);
79 ValueBuilder(std::string_view str);
81 ValueBuilder(
unsigned int t);
82 ValueBuilder(uint64_t t);
83 ValueBuilder(int64_t t);
84 ValueBuilder(
float t);
85 ValueBuilder(
double t);
91 typename = std::enable_if_t<
92 !std::is_same_v<std::decay_t<T>, ValueBuilder> && !std::is_same_v<std::decay_t<T>,
Value> &&
93 !std::is_same_v<std::decay_t<T>, std::string>>>
94 ValueBuilder(T&& t) : ValueBuilder(DoSerialize(std::forward<T>(t))) {}
107 utils::StrongTypedefOps Ops,
108 typename Enable = std::enable_if_t<
utils::IsStrongTypedefLoggable(Ops)>>
109 ValueBuilder
operator[](
utils::StrongTypedef<Tag, std::string, Ops> key);
181 class EmplaceEnabler {};
185 ValueBuilder(EmplaceEnabler, impl::MutableValueWrapper)
noexcept;
189 enum class CheckMemberExists { kYes, kNo };
191 explicit ValueBuilder(impl::MutableValueWrapper)
noexcept;
193 static void Copy(impl::Value& to,
const ValueBuilder& from);
194 static void Move(impl::Value& to, ValueBuilder&& from);
196 impl::Value& AddMember(std::string_view key, CheckMemberExists);
198 template <
typename T>
199 static Value DoSerialize(T&& t);
201 impl::MutableValueWrapper value_;
250std::enable_if_t<meta::kIsUniqueMap<T> && std::is_convertible_v<
typename T::key_type, std::string>,
Value>