Skip to content

Commit

Permalink
Workaround clang 3.5 issue with const object initialization
Browse files Browse the repository at this point in the history
Signed-off-by: kimci86 <kimci86@hotmail.fr>
  • Loading branch information
kimci86 committed Jan 14, 2025
1 parent 04162d3 commit 749b983
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/unit-udt_macro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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":""})"));
Expand Down Expand Up @@ -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":""})"));
Expand Down

0 comments on commit 749b983

Please sign in to comment.