🚑 fix for #486

Implemented std::less<value_t> to allow using value_t as std::map key
in MSVC.
This commit is contained in:
Niels Lohmann 2017-03-12 10:40:36 +01:00
commit 4d7c29923e
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
3 changed files with 39 additions and 0 deletions

View file

@ -796,6 +796,13 @@ TEST_CASE("regression tests")
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};