Fix parent update for diagnostics with ordered_json (#2963)

🐛 fix parent update for diagnostics with ordered_json
This commit is contained in:
Niels Lohmann
2021-08-22 20:30:20 +02:00
committed by GitHub
parent f03127eb69
commit c753165db6
4 changed files with 76 additions and 0 deletions

View File

@@ -174,4 +174,14 @@ TEST_CASE("Better diagnostics")
j_obj["key"] = j_arr;
}
}
SECTION("Regression test for issue #2962 - JSON_DIAGNOSTICS assertion for ordered_json")
{
nlohmann::ordered_json j;
nlohmann::ordered_json j2;
const std::string value;
j["first"] = value;
j["second"] = value;
j2["something"] = j;
}
}