From 798d09bb70ddc29f03d11a5841f8af617d21d164 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 30 May 2022 12:50:57 -0700 Subject: [PATCH] Debug ppc failure --- include/fmt/format.h | 7 +++++-- test/format-impl-test.cc | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 36b6137f..8d1be797 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1314,10 +1314,13 @@ struct float_info::digits == 64 || static const int exponent_bits = 15; }; +template constexpr int check_digits(); + // A double-double floating point number. template -struct float_info::digits >= 106 && - !std::numeric_limits::is_iec559>> { +struct float_info::is_iec559 && + !is_float128::value>> { + static constexpr int check = check_digits::digits>(); using carrier_uint = detail::uint128_t; }; diff --git a/test/format-impl-test.cc b/test/format-impl-test.cc index bea9bd67..b231f556 100644 --- a/test/format-impl-test.cc +++ b/test/format-impl-test.cc @@ -385,10 +385,11 @@ template <> struct numeric_limits { } // namespace std TEST(format_impl_test, write_double_double) { - auto s = std::string(); - fmt::detail::write(std::back_inserter(s), double_double(42), {}); + // TODO: restore + // auto s = std::string(); + // fmt::detail::write(std::back_inserter(s), double_double(42), {}); #ifndef _MSC_VER // MSVC has an issue with specializing is_floating_point. - EXPECT_EQ(s, "42"); + // EXPECT_EQ(s, "42"); #endif }