From 2998f2c73144a2e0c477abd5c4403ed87d5f47af Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 31 Aug 2026 20:53:56 +0000 Subject: [PATCH] Update the serializer test for the non-owning adapter ctor check_escaped constructed the serializer with output_adapter(ss), which produced the old owning output_adapter_t. The ctor now takes a non-owning output_adapter_protocol*, so build the concrete output_stream_adapter on the stack and pass its address, matching how dump() and operator<< now call it. Signed-off-by: Claude --- tests/src/unit-convenience.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/src/unit-convenience.cpp b/tests/src/unit-convenience.cpp index 839f1c86e..7476c75cb 100644 --- a/tests/src/unit-convenience.cpp +++ b/tests/src/unit-convenience.cpp @@ -98,7 +98,8 @@ void check_escaped(const char* original, const char* escaped = "", bool ensure_a void check_escaped(const char* original, const char* escaped, const bool ensure_ascii) { std::stringstream ss; - json::serializer s(nlohmann::detail::output_adapter(ss), ' '); + nlohmann::detail::output_stream_adapter adapter(ss); + json::serializer s(&adapter, ' '); s.dump_escaped(original, ensure_ascii); s.flush(); // dump_escaped writes into the serializer's internal buffer CHECK(ss.str() == escaped);