summaryrefslogtreecommitdiff
path: root/current/sources/cxx-stl/llvm-libc++/include/__undef_macros
diff options
context:
space:
mode:
Diffstat (limited to 'current/sources/cxx-stl/llvm-libc++/include/__undef_macros')
-rw-r--r--current/sources/cxx-stl/llvm-libc++/include/__undef_macros33
1 files changed, 33 insertions, 0 deletions
diff --git a/current/sources/cxx-stl/llvm-libc++/include/__undef_macros b/current/sources/cxx-stl/llvm-libc++/include/__undef_macros
new file mode 100644
index 000000000..4923ee6b4
--- /dev/null
+++ b/current/sources/cxx-stl/llvm-libc++/include/__undef_macros
@@ -0,0 +1,33 @@
+// -*- C++ -*-
+//===------------------------ __undef_macros ------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+
+#ifdef min
+#if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
+#if defined(_LIBCPP_WARNING)
+_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
+#endif
+#undef min
+#endif
+
+#ifdef max
+#if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
+#if defined(_LIBCPP_WARNING)
+_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
+#endif
+#undef max
+#endif