From 2f89912064b28c4dfdbd4ac707dbfd8e13bd3ea5 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 14 Nov 2026 22:06:37 +0100 Subject: [PATCH] Fix VS 2015 build of unit-bon8: compare tellg() outside doctest decomposition VS 2015 cannot find an operator== for doctest's Expression_lhs and int, introduced in #6119. Evaluate the comparison as a plain bool. Signed-off-by: Niels Lohmann --- tests/src/unit-bon8.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/unit-bon8.cpp b/tests/src/unit-bon8.cpp index 36336fa0a..84522db64 100644 --- a/tests/src/unit-bon8.cpp +++ b/tests/src/unit-bon8.cpp @@ -622,7 +622,7 @@ TEST_CASE("BON8") // with a terminated string, strict = false leaves the next value in the stream std::istringstream terminated(std::string("\x61\xFF\x90", 3)); CHECK(json::from_bon8(terminated, false) == "a"); - CHECK(terminated.tellg() == 2); + CHECK((terminated.tellg() == 2)); CHECK(json::from_bon8(terminated, false) == 0); // without the terminator, the next value would be lost