From 79f6513cecbb8bb0a60575b079886a3b9898879d Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 15 Nov 2026 12:25:21 +0100 Subject: [PATCH] Fix VS 2015 build of unit-bon8: compare tellg() outside doctest decomposition (#6128) 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