From 749b983aa87c0f8d09bc77156b8da3a73105790e Mon Sep 17 00:00:00 2001 From: kimci86 Date: Tue, 14 Jan 2025 19:58:40 +0100 Subject: [PATCH] Workaround clang 3.5 issue with const object initialization Signed-off-by: kimci86 --- tests/src/unit-udt_macro.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/src/unit-udt_macro.cpp b/tests/src/unit-udt_macro.cpp index bebfe38fda..0be6b59245 100644 --- a/tests/src/unit-udt_macro.cpp +++ b/tests/src/unit-udt_macro.cpp @@ -538,7 +538,7 @@ TEST_CASE_TEMPLATE("Serialization/deserialization via NLOHMANN_DEFINE_TYPE_INTRU SECTION("person with default values") { // serialization of default constructed object - const T p0; + const T p0{}; CHECK(Json(p0).dump() == (is_ordered ? R"({"age":0,"name":"","metadata":null})" : R"({"age":0,"metadata":null,"name":""})")); @@ -589,7 +589,7 @@ TEST_CASE_TEMPLATE("Serialization/deserialization via NLOHMANN_DEFINE_DERIVED_TY SECTION("derived person with default values") { // serialization of default constructed object - const T p0; + const T p0{}; CHECK(Json(p0).dump() == (is_ordered ? R"({"age":0,"name":"","metadata":null,"hair_color":"blue"})" : R"({"age":0,"hair_color":"blue","metadata":null,"name":""})"));