From e7cca81d9ab70ecfa318cc805767469224e64a0a Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 13 Sep 2026 20:42:45 +0200 Subject: [PATCH] Mark the parse callback in the new test noexcept GCC's -Wnoexcept (part of the ci_test_gcc warning set) rejects the lambda passed to parse() because it cannot throw but is not declared noexcept, matching the existing callback in unit-regression2.cpp. Signed-off-by: Niels Lohmann Co-Authored-By: Claude Opus 5 --- tests/src/unit-regression3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/unit-regression3.cpp b/tests/src/unit-regression3.cpp index 2f41789fc..11c6a7da8 100644 --- a/tests/src/unit-regression3.cpp +++ b/tests/src/unit-regression3.cpp @@ -913,7 +913,7 @@ TEST_CASE("regression test #5476 - array type without reserve()") CHECK(deque_json::from_msgpack(deque_json::to_msgpack(j)) == j); // parse() instantiates the callback parser as well, which reserves too - const auto with_callback = deque_json::parse(R"([1,2,3])", [](int /*depth*/, deque_json::parse_event_t /*event*/, deque_json& /*parsed*/) + const auto with_callback = deque_json::parse(R"([1,2,3])", [](int /*depth*/, deque_json::parse_event_t /*event*/, deque_json& /*parsed*/) noexcept { return true; });