diff --git a/include/fmt/format.h b/include/fmt/format.h index 8c67805a..a57f7b65 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -282,7 +282,7 @@ FMT_END_NAMESPACE FMT_BEGIN_NAMESPACE namespace detail { -#if __cplusplus >= 202002L +#if __cplusplus >= 202002L || FMT_GCC_VERSION >= 1002 # define FMT_CONSTEXPR20 constexpr #else # define FMT_CONSTEXPR20 inline diff --git a/test/compile-test.cc b/test/compile-test.cc index e1bf5173..5dba5019 100644 --- a/test/compile-test.cc +++ b/test/compile-test.cc @@ -184,7 +184,7 @@ TEST(CompileTest, CompileFormatStringLiteral) { } #endif -#if __cplusplus >= 202002L +#if __cplusplus >= 202002L || FMT_GCC_VERSION >= 1002 template struct test_string { template constexpr bool operator==(const T& rhs) const noexcept { return fmt::basic_string_view(rhs).compare(buffer.data()) == 0;