From f5022b5ca8b820205cf3bbb800ebb02b3a115378 Mon Sep 17 00:00:00 2001 From: Peter Kolbus Date: Mon, 26 Mar 2018 22:38:33 -0500 Subject: [PATCH] Fix MSVC C4668 in throw_exception.hpp Fix MSVC C4668 warnings (undefined preprocessor macro) for __GNUC__ and __GNUC_MINOR__ by checking if __GNUC__ is defined first. --- include/boost/throw_exception.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/throw_exception.hpp b/include/boost/throw_exception.hpp index d45306c..c7d7637 100644 --- a/include/boost/throw_exception.hpp +++ b/include/boost/throw_exception.hpp @@ -3,7 +3,7 @@ #include -#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#if defined(__GNUC__) && (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)