fix macro check for formatting at compile-time on GCC 10.2+
This commit is contained in:
parent
6714f90a5d
commit
8131d4f094
@ -282,7 +282,8 @@ FMT_END_NAMESPACE
|
||||
FMT_BEGIN_NAMESPACE
|
||||
namespace detail {
|
||||
|
||||
#if __cplusplus >= 202002L || FMT_GCC_VERSION >= 1002
|
||||
#if __cplusplus >= 202002L || \
|
||||
(__cplusplus >= 201709L && FMT_GCC_VERSION >= 1002)
|
||||
# define FMT_CONSTEXPR20 constexpr
|
||||
#else
|
||||
# define FMT_CONSTEXPR20 inline
|
||||
|
||||
@ -184,7 +184,8 @@ TEST(CompileTest, CompileFormatStringLiteral) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 202002L || FMT_GCC_VERSION >= 1002
|
||||
#if __cplusplus >= 202002L || \
|
||||
(__cplusplus >= 201709L && FMT_GCC_VERSION >= 1002)
|
||||
template <size_t max_string_length, typename Char = char> struct test_string {
|
||||
template <typename T> constexpr bool operator==(const T& rhs) const noexcept {
|
||||
return fmt::basic_string_view<Char>(rhs).compare(buffer.data()) == 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user