diff --git a/include/nlohmann/detail/input/input_adapters.hpp b/include/nlohmann/detail/input/input_adapters.hpp index 490c05877..54c97df6b 100644 --- a/include/nlohmann/detail/input/input_adapters.hpp +++ b/include/nlohmann/detail/input/input_adapters.hpp @@ -399,7 +399,7 @@ class input_adapter /// input adapter for array template input_adapter(T (&array)[N]) - : input_adapter(std::begin(array), (N > 0 && array[N - 1]) == 0 ? std::prev(std::end(array)) : std::end(array)) {} + : input_adapter(std::begin(array), (N > 0 && array[N - 1] == 0) ? std::prev(std::end(array)) : std::end(array)) {} /// input adapter for contiguous container template input_adapter(T (&array)[N]) - : input_adapter(std::begin(array), (N > 0 && array[N - 1]) == 0 ? std::prev(std::end(array)) : std::end(array)) {} + : input_adapter(std::begin(array), (N > 0 && array[N - 1] == 0) ? std::prev(std::end(array)) : std::end(array)) {} /// input adapter for contiguous container template'; expected end of input"); + "[json.exception.parse_error.101] parse error at line 1, column 5: syntax error while parsing value - invalid literal; last read: 'true'; expected end of input"); } SECTION("from array") @@ -1650,7 +1650,7 @@ TEST_CASE("parser class") uint8_t v[] = {}; json j; CHECK_THROWS_WITH(json::parser(nlohmann::detail::input_adapter(v)).parse(true, j), - "[json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal"); + "[json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal"); }