fmtlib / fmt

A modern formatting library
https://fmt.dev
Other
19.9k stars 2.43k forks source link

Fix FMT_USE_NONTYPE_TEMPLATE_ARGS define back #3937

Closed Arghnews closed 3 months ago

Arghnews commented 3 months ago

Broken in refactor f1924d3

From #3935 @timsong-cpp 's guess was right

Was:

#if
...
      ((FMT_GCC_VERSION >= 903 && FMT_CPLUSPLUS >= 201709L) || \
       __cpp_nontype_template_args >= 201911L) &&              \
...
#define FMT_USE_NONTYPE_TEMPLATE_ARGS 1

Became:

#elif FMT_GCC_VERSION >= 903 && FMT_CPLUSPLUS >= 201709L
#  define FMT_USE_NONTYPE_TEMPLATE_ARGS 0
#elif defined(__cpp_nontype_template_args) && \
    __cpp_nontype_template_args >= 201911L
#  define FMT_USE_NONTYPE_TEMPLATE_ARGS 1

Fix is to set back to previous

vitaut commented 3 months ago

Thank you!