diff --git a/test/src/unit-noexcept.cpp b/test/src/unit-noexcept.cpp index 898e77965..96d388c7a 100644 --- a/test/src/unit-noexcept.cpp +++ b/test/src/unit-noexcept.cpp @@ -44,16 +44,16 @@ void from_json(const json&, pod) noexcept; void from_json(const json&, pod_bis); static json j; -static_assert(noexcept(json{}), ""); +static_assert(noexcept(json {}), ""); static_assert(noexcept(nlohmann::to_json(j, 2)), ""); static_assert(noexcept(nlohmann::to_json(j, 2.5)), ""); static_assert(noexcept(nlohmann::to_json(j, true)), ""); -static_assert(noexcept(nlohmann::to_json(j, test{})), ""); -static_assert(noexcept(nlohmann::to_json(j, pod{})), ""); -static_assert(not noexcept(nlohmann::to_json(j, pod_bis{})), ""); +static_assert(noexcept(nlohmann::to_json(j, test {})), ""); +static_assert(noexcept(nlohmann::to_json(j, pod {})), ""); +static_assert(not noexcept(nlohmann::to_json(j, pod_bis {})), ""); static_assert(noexcept(json(2)), ""); -static_assert(noexcept(json(test{})), ""); -static_assert(noexcept(json(pod{})), ""); +static_assert(noexcept(json(test {})), ""); +static_assert(noexcept(json(pod {})), ""); static_assert(noexcept(j.get()), ""); static_assert(not noexcept(j.get()), ""); -static_assert(noexcept(json(pod{})), ""); +static_assert(noexcept(json(pod {})), ""); diff --git a/test/src/unit-udt.cpp b/test/src/unit-udt.cpp index 6aa469fe4..11f6f343b 100644 --- a/test/src/unit-udt.cpp +++ b/test/src/unit-udt.cpp @@ -584,7 +584,7 @@ struct pod_serializer std::is_pod::value and std::is_class::value, int>::type = 0> static void to_json(BasicJsonType& j, const T& t) noexcept { - auto bytes = static_cast< const unsigned char*>(static_cast(&t)); + auto bytes = static_cast(static_cast(&t)); std::uint64_t value = bytes[0]; for (auto i = 1; i < 8; ++i) value |= std::uint64_t{bytes[i]} << 8 * i;