From 122afbf1280413ade3719d6af2c37352215e30f0 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 11 Mar 2017 18:43:21 +0100 Subject: [PATCH] :hammer: added defined() check --- src/json.hpp | 2 +- src/json.hpp.re2c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index f9a928202..725310f6d 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -82,7 +82,7 @@ SOFTWARE. #endif // allow to disable exceptions -#if (__cpp_exceptions || defined(_CPPUNWIND)) && not defined(JSON_NOEXCEPTION) +#if (defined(__cpp_exceptions) || defined(_CPPUNWIND)) && not defined(JSON_NOEXCEPTION) #define JSON_THROW(exception) throw exception #define JSON_TRY try #define JSON_CATCH(exception) catch(exception) diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 2cad18aa4..9172d2bfa 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -82,7 +82,7 @@ SOFTWARE. #endif // allow to disable exceptions -#if (__cpp_exceptions || defined(_CPPUNWIND)) && not defined(JSON_NOEXCEPTION) +#if (defined(__cpp_exceptions) || defined(_CPPUNWIND)) && not defined(JSON_NOEXCEPTION) #define JSON_THROW(exception) throw exception #define JSON_TRY try #define JSON_CATCH(exception) catch(exception) -- GitLab