From ee0ceac55d8e5801a745b2d3a00e92da82f0f308 Mon Sep 17 00:00:00 2001 From: Kirill Lokotkov Date: Wed, 25 Jan 2023 18:44:28 +0300 Subject: [PATCH] C++11 compatibility --- include/nlohmann/detail/output/serializer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nlohmann/detail/output/serializer.hpp b/include/nlohmann/detail/output/serializer.hpp index c3e8d291d..f18339fe7 100644 --- a/include/nlohmann/detail/output/serializer.hpp +++ b/include/nlohmann/detail/output/serializer.hpp @@ -833,7 +833,7 @@ class serializer // the actual conversion // NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg) std::ptrdiff_t len; - if constexpr (std::is_same_v) { + if (std::is_same::value) { len = (std::snprintf)(number_buffer.data(), number_buffer.size(), "%.*Lg", d, x); } else { len = (std::snprintf)(number_buffer.data(), number_buffer.size(), "%.*g", d, x);