From e38997be4dc75d94272f74e733a065d089ab291e Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 11 Oct 2019 16:43:48 +0300 Subject: [PATCH] Reorder conditions to support clang-cl --- include/boost/core/lightweight_test.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/boost/core/lightweight_test.hpp b/include/boost/core/lightweight_test.hpp index 0f8274d..a87b706 100644 --- a/include/boost/core/lightweight_test.hpp +++ b/include/boost/core/lightweight_test.hpp @@ -110,14 +110,14 @@ inline void throw_failed_impl(char const * excep, char const * file, int line, c // In the comparisons below, it is possible that T and U are signed and unsigned integer types, which generates warnings in some compilers. // A cleaner fix would require common_type trait or some meta-programming, which would introduce a dependency on Boost.TypeTraits. To avoid // the dependency we just disable the warnings. -#if defined(_MSC_VER) -# pragma warning(push) -# pragma warning(disable: 4389) -#elif defined(__clang__) && defined(__has_warning) +#if defined(__clang__) && defined(__has_warning) # if __has_warning("-Wsign-compare") # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wsign-compare" # endif +#elif defined(_MSC_VER) +# pragma warning(push) +# pragma warning(disable: 4389) #elif defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wsign-compare" @@ -361,12 +361,12 @@ void test_all_with_impl(FormattedOutputFunction& output, } } -#if defined(_MSC_VER) -# pragma warning(pop) -#elif defined(__clang__) && defined(__has_warning) +#if defined(__clang__) && defined(__has_warning) # if __has_warning("-Wsign-compare") # pragma clang diagnostic pop # endif +#elif defined(_MSC_VER) +# pragma warning(pop) #elif defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 # pragma GCC diagnostic pop #endif