summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/include/__undef_min_max
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libc++/include/__undef_min_max')
-rw-r--r--contrib/libc++/include/__undef_min_max10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/libc++/include/__undef_min_max b/contrib/libc++/include/__undef_min_max
index b1e80d1..5df9412 100644
--- a/contrib/libc++/include/__undef_min_max
+++ b/contrib/libc++/include/__undef_min_max
@@ -9,11 +9,21 @@
//===----------------------------------------------------------------------===//
#ifdef min
+#if defined(_MSC_VER) && ! defined(__clang__)
+_LIBCPP_WARNING("macro min is incompatible with C++. Try #define NOMINMAX "
+ "before any Windows header. #undefing min")
+#else
#warning: macro min is incompatible with C++. #undefing min
+#endif
#undef min
#endif
#ifdef max
+#if defined(_MSC_VER) && ! defined(__clang__)
+_LIBCPP_WARNING("macro max is incompatible with C++. Try #define NOMINMAX "
+ "before any Windows header. #undefing max")
+#else
#warning: macro max is incompatible with C++. #undefing max
+#endif
#undef max
#endif
OpenPOWER on IntegriCloud