From 75a4525e5f1d63d082c21ebce51ca0d474a682e4 Mon Sep 17 00:00:00 2001 From: refnum <68672+refnum@users.noreply.github.com> Date: Sun, 1 Mar 2020 01:19:34 +0000 Subject: [PATCH] Move FMT_CLANG_VERSION definition to core.h (#1568) Previously format.h defined FMT_CLANG_VERSION after including core.h, however core.h tests FMT_CLANG_VERSION when it defines FMT_API. --- include/fmt/core.h | 6 ++++++ include/fmt/format.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index a107db3c..f5eb7e3a 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -36,6 +36,12 @@ # define FMT_HAS_CPP_ATTRIBUTE(x) 0 #endif +#ifdef __clang__ +# define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__) +#else +# define FMT_CLANG_VERSION 0 +#endif + #if defined(__GNUC__) && !defined(__clang__) # define FMT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) #else diff --git a/include/fmt/format.h b/include/fmt/format.h index ed87ea3d..acd7d9dc 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -43,12 +43,6 @@ #include "core.h" -#ifdef __clang__ -# define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__) -#else -# define FMT_CLANG_VERSION 0 -#endif - #ifdef __INTEL_COMPILER # define FMT_ICC_VERSION __INTEL_COMPILER #elif defined(__ICL)