1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-22 15:21:52 +03:00

Merge branch 'develop' into feature/exceptions_3.0.0

This commit is contained in:
Niels Lohmann
2017-03-12 11:51:24 +01:00
7 changed files with 116 additions and 8 deletions

View File

@ -833,4 +833,20 @@ TEST_CASE("regression tests")
std::string s2 = j2.dump();
CHECK(s1 == s2);
}
SECTION("issue #486 - json::value_t can't be a map's key type in VC++ 2015")
{
// the code below must compile with MSVC
std::map<json::value_t, std::string> jsonTypes ;
jsonTypes[json::value_t::array] = "array";
}
SECTION("issue #494 - conversion from vector<bool> to json fails to build")
{
std::vector<bool> boolVector = {false, true, false, false};
json j;
j["bool_vector"] = boolVector;
CHECK(j["bool_vector"].dump() == "[false,true,false,false]");
}
}