From 40638a75b3245702272da9c7a9afefb4223cc3af Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Tue, 14 Jan 2020 10:54:19 -0700 Subject: [PATCH] Use C++11 compatible std::is_same operations The `operator()` member function of `std::is_same` was added in C++14. For C++11, the `::value` needs to be used instead. --- include/fmt/format-inl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index 5f07a465..d812c3e1 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -1038,7 +1038,7 @@ void fallback_format(Double d, buffer& buf, int& exp10) { // if T is a IEEE754 binary32 or binary64 and snprintf otherwise. template int format_float(T value, int precision, float_specs specs, buffer& buf) { - static_assert(!std::is_same(), ""); + static_assert(!std::is_same::value, ""); FMT_ASSERT(value >= 0, "value is negative"); const bool fixed = specs.format == float_format::fixed; @@ -1113,7 +1113,7 @@ int snprintf_float(T value, int precision, float_specs specs, buffer& buf) { // Buffer capacity must be non-zero, otherwise MSVC's vsnprintf_s will fail. FMT_ASSERT(buf.capacity() > buf.size(), "empty buffer"); - static_assert(!std::is_same(), ""); + static_assert(!std::is_same::value, ""); // Subtract 1 to account for the difference in precision since we use %e for // both general and exponent format.