use bool rather than json(bool) to avoid compiler ambiguity errors

the second value of the tuple returned by std::set.insert() is a native bool, not a json(bool).
This commit is contained in:
ronen barzel 2017-01-31 14:41:00 +00:00
parent a23535dc3f
commit 0c454dcc1b

View File

@ -456,7 +456,7 @@ void json_validator::validate_array(json &instance, const json &schema, const st
std::set<json> array_to_set; std::set<json> array_to_set;
for (auto v : instance) { for (auto v : instance) {
auto ret = array_to_set.insert(v); auto ret = array_to_set.insert(v);
if (ret.second == json(false)) if (ret.second == false)
throw std::out_of_range(name + " should have only unique items."); throw std::out_of_range(name + " should have only unique items.");
} }
} }