From 9f6c86f23317ccc67429be779a6f17855c6e5a0b Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Wed, 4 Jan 2017 18:54:44 +0100 Subject: [PATCH] :bug: fix for #417 --- src/json.hpp | 6 ++---- src/json.hpp.re2c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index 6b1dc6636..e88619268 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -58,13 +58,11 @@ SOFTWARE. // exclude unsupported compilers #if defined(__clang__) - #define CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) - #if CLANG_VERSION < 30400 + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" #endif #elif defined(__GNUC__) - #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) - #if GCC_VERSION < 40900 + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900 #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" #endif #endif diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 0eed0e6d9..3a12a78de 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -58,13 +58,11 @@ SOFTWARE. // exclude unsupported compilers #if defined(__clang__) - #define CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) - #if CLANG_VERSION < 30400 + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" #endif #elif defined(__GNUC__) - #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) - #if GCC_VERSION < 40900 + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900 #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" #endif #endif