Add protection from min/max macros
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145407 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/__undef_min_max b/include/__undef_min_max
new file mode 100644
index 0000000..88bc53f
--- /dev/null
+++ b/include/__undef_min_max
@@ -0,0 +1,19 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifdef min
+#warning: macro min is incompatible with C++. #undef'ing min
+#undef min
+#endif
+
+#ifdef max
+#warning: macro max is incompatible with C++. #undef'ing max
+#undef max
+#endif