Add noexcept to JSON objects. (#7205)

This commit is contained in:
Jiaming Yuan
2021-09-07 13:56:48 +08:00
committed by GitHub
parent 3a4f51f39f
commit b12e7f7edd
3 changed files with 18 additions and 12 deletions

View File

@@ -332,6 +332,7 @@ TEST(Json, AssigningObjects) {
auto str = JsonString("1");
auto& k = json_object["1"];
k = std::move(str);
ASSERT_TRUE(str.GetString().empty()); // NOLINT
auto& m = json_object["1"];
std::string value = get<JsonString>(m);
ASSERT_EQ(value, "1");