Disallow JsonObject copying.

This commit is contained in:
levlam 2023-07-31 20:01:02 +03:00
parent dd68528ae4
commit b8859da77d
1 changed files with 6 additions and 0 deletions

View File

@ -467,6 +467,12 @@ class JsonObject {
explicit JsonObject(vector<std::pair<Slice, JsonValue>> &&field_values) : field_values_(std::move(field_values)) {
}
JsonObject(const JsonObject &) = delete;
JsonObject &operator=(const JsonObject &) = delete;
JsonObject(JsonObject &&) noexcept = default;
JsonObject &operator=(JsonObject &&) noexcept = default;
~JsonObject() = default;
size_t field_count() const {
return field_values_.size();
}