diff --git a/fmt/format.h b/fmt/format.h index 1db3d9da..fac9333a 100644 --- a/fmt/format.h +++ b/fmt/format.h @@ -107,6 +107,7 @@ typedef __int64 intmax_t; #endif #if defined(__clang__) && !defined(FMT_ICC_VERSION) +# define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__) # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wdocumentation-unknown-command" # pragma clang diagnostic ignored "-Wpadded" @@ -269,12 +270,8 @@ typedef __int64 intmax_t; #endif #ifndef FMT_USE_EXTERN_TEMPLATES -// Clang doesn't have a feature check for extern templates so we check -// for variadic templates which were introduced in the same version. -// For GCC according to cppreference.com they were introduced in 3.3. # define FMT_USE_EXTERN_TEMPLATES \ - ((__clang__ && FMT_USE_VARIADIC_TEMPLATES) || \ - (FMT_GCC_VERSION >= 303 && FMT_HAS_GXX_CXX11)) + (FMT_CLANG_VERSION >= 209 || (FMT_GCC_VERSION >= 303 && FMT_HAS_GXX_CXX11)) #endif #ifdef FMT_HEADER_ONLY