Imported Upstream version 1.72.0
[platform/upstream/boost.git] / boost / core / lightweight_test.hpp
index 0f8274d..a87b706 100644 (file)
@@ -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