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 {