From 81434980dc94c9d24ccbe386b6dddbbd9c99c3a7 Mon Sep 17 00:00:00 2001 From: Justin Riddell Date: Tue, 27 Aug 2024 23:45:12 +0100 Subject: [PATCH] Fix gcc 8.1 - 8.3 bug and compilation Fixes issue #4129 --- include/fmt/base.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 671c2ec7ec5f7..b99dfd7f5d991 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -1580,8 +1580,19 @@ template <> struct is_output_iterator : std::true_type {}; template struct is_output_iterator< +#if FMT_GCC_VERSION >= 800 && FMT_GCC_VERSION <= 803 + // Workaround old gcc bug, raised in issue 4129 + It, T, + void_t::value, + typename std::add_pointer< + typename std::remove_extent::type>::type, + It>&>()++ = std::declval())>> +#else It, T, void_t()++ = std::declval())>> - : std::true_type {}; +#endif + : std::true_type { +}; // A type-erased reference to an std::locale to avoid a heavy include. class locale_ref {