From f5b7d3a4f9e927fc632a1c1ea694b14baefe3a7a Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 23 Jul 2018 19:10:47 +0100 Subject: [PATCH] Correct apple clang version check. --- include/boost/regex/v4/instances.hpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/include/boost/regex/v4/instances.hpp b/include/boost/regex/v4/instances.hpp index f695f01a..0e423437 100644 --- a/include/boost/regex/v4/instances.hpp +++ b/include/boost/regex/v4/instances.hpp @@ -122,11 +122,17 @@ template class BOOST_REGEX_TEMPLATE_DECL ::boost::BOOST_REGEX_DETAIL_NS::perl_ma #elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) -#ifdef __clang__ -#pragma clang diagnostic push -#if (__clang_major__ > 3) || ((__clang_major__ == 3) && (__clang_minor__ > 5)) -#pragma clang diagnostic ignored "-Wkeyword-macro" -#endif +#if defined(__clang__) +# pragma clang diagnostic push +# if defined(__APPLE_CC__) +# if (__clang_major__ > 6) +# pragma clang diagnostic ignored "-Wkeyword-macro" +# endif +# else +# if (__clang_major__ > 3) || ((__clang_major__ == 3) && (__clang_minor__ > 5)) +# pragma clang diagnostic ignored "-Wkeyword-macro" +# endif +# endif #endif # ifndef BOOST_REGEX_INSTANTIATE