enable formatting at compile-time for GCC 10.2+
This commit is contained in:
parent
b8d973aaa0
commit
6714f90a5d
@ -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
|
||||
|
||||
@ -184,7 +184,7 @@ TEST(CompileTest, CompileFormatStringLiteral) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 202002L
|
||||
#if __cplusplus >= 202002L || 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