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:
parent
a23535dc3f
commit
0c454dcc1b
@ -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.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user