diff --git a/include/fmt/core.h b/include/fmt/core.h index 4cfa00bfda38..1f782647ad80 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -94,7 +94,8 @@ # define FMT_CONSTEXPR_DECL #endif -#if __cplusplus >= 202002L || \ +#if ((__cplusplus >= 202002L) && \ + (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE > 9)) || \ (__cplusplus >= 201709L && FMT_GCC_VERSION >= 1002) # define FMT_CONSTEXPR20 constexpr #else