Skip to content

Commit

Permalink
Fix gcc 8.1 - 8.3 bug and compilation
Browse files Browse the repository at this point in the history
Fixes issue #4129
  • Loading branch information
Arghnews committed Aug 27, 2024
1 parent 0379bf3 commit 8143498
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -1580,8 +1580,19 @@ template <> struct is_output_iterator<appender, char> : std::true_type {};

template <typename It, typename T>
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<decltype(*std::declval<conditional_t<
std::is_array<It>::value,
typename std::add_pointer<
typename std::remove_extent<It>::type>::type,
It>&>()++ = std::declval<T>())>>
#else
It, T, void_t<decltype(*std::declval<It&>()++ = std::declval<T>())>>
: std::true_type {};
#endif
: std::true_type {
};

// A type-erased reference to an std::locale to avoid a heavy <locale> include.
class locale_ref {
Expand Down

0 comments on commit 8143498

Please sign in to comment.