From 0c454dcc1b3eb07dc0bc1028c1ec6bae11c42e91 Mon Sep 17 00:00:00 2001 From: ronen barzel Date: Tue, 31 Jan 2017 14:41:00 +0000 Subject: [PATCH] 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). --- src/json-validator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/json-validator.cpp b/src/json-validator.cpp index 0525ebb..1e44d96 100644 --- a/src/json-validator.cpp +++ b/src/json-validator.cpp @@ -456,7 +456,7 @@ void json_validator::validate_array(json &instance, const json &schema, const st std::set array_to_set; for (auto v : instance) { 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."); } }