From f085c3d7a0d8daeb209195c0a55da384b57b2633 Mon Sep 17 00:00:00 2001 From: Alexey Ochapov Date: Thu, 22 Apr 2021 23:17:39 +0300 Subject: [PATCH] use proper check for non-type template parameters --- include/fmt/format.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index e15131d6..24210fc6 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -264,8 +264,9 @@ FMT_END_NAMESPACE #endif #ifndef FMT_USE_NONTYPE_TEMPLATE_PARAMETERS -# if defined(__cpp_nontype_template_parameter_class) && \ - (!FMT_GCC_VERSION || FMT_GCC_VERSION >= 903) +# if defined(__cpp_nontype_template_args) && \ + ((FMT_GCC_VERSION >= 903 && __cplusplus >= 201709L) || \ + __cpp_nontype_template_args >= 201911L) # define FMT_USE_NONTYPE_TEMPLATE_PARAMETERS 1 # else # define FMT_USE_NONTYPE_TEMPLATE_PARAMETERS 0