diff --git a/fmt/format.h b/fmt/format.h index 5013b810..a31b9dca 100644 --- a/fmt/format.h +++ b/fmt/format.h @@ -98,6 +98,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" #endif @@ -830,6 +831,14 @@ struct FMT_API BasicData { static const char DIGITS[]; }; +#ifndef FMT_USE_EXTERN_TEMPLATES +# define FMT_USE_EXTERN_TEMPLATES (FMT_CLANG_VERSION >= 209) +#endif + +#if FMT_USE_EXTERN_TEMPLATES +extern template struct BasicData; +#endif + typedef BasicData<> Data; #ifdef FMT_BUILTIN_CLZLL