mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-08 02:28:15 +00:00
Fix undefined-var-template warning on clang when not compiling with -std=c++11
This commit is contained in:
parent
5e23fff052
commit
e8ef103799
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user