Fix undefined-var-template warning on clang when not compiling with -std=c++11

This commit is contained in:
Victor Zverovich 2017-06-25 07:49:31 -07:00
parent 5e23fff052
commit e8ef103799

View File

@ -107,6 +107,7 @@ typedef __int64 intmax_t;
#endif #endif
#if defined(__clang__) && !defined(FMT_ICC_VERSION) #if defined(__clang__) && !defined(FMT_ICC_VERSION)
# define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__)
# pragma clang diagnostic push # pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdocumentation-unknown-command" # pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
# pragma clang diagnostic ignored "-Wpadded" # pragma clang diagnostic ignored "-Wpadded"
@ -269,12 +270,8 @@ typedef __int64 intmax_t;
#endif #endif
#ifndef FMT_USE_EXTERN_TEMPLATES #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 \ # define FMT_USE_EXTERN_TEMPLATES \
((__clang__ && FMT_USE_VARIADIC_TEMPLATES) || \ (FMT_CLANG_VERSION >= 209 || (FMT_GCC_VERSION >= 303 && FMT_HAS_GXX_CXX11))
(FMT_GCC_VERSION >= 303 && FMT_HAS_GXX_CXX11))
#endif #endif
#ifdef FMT_HEADER_ONLY #ifdef FMT_HEADER_ONLY