[libcxx] r294103 - Merge r294099 - Undefine min/max in __tree
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 4 14:36:28 PST 2017
Author: ericwf
Date: Sat Feb 4 16:36:27 2017
New Revision: 294103
URL: http://llvm.org/viewvc/llvm-project?rev=294103&view=rev
Log:
Merge r294099 - Undefine min/max in __tree
Added:
libcxx/branches/release_40/test/libcxx/containers/associative/undef_min_max.pass.cpp
Modified:
libcxx/branches/release_40/include/__tree
Modified: libcxx/branches/release_40/include/__tree
URL: http://llvm.org/viewvc/llvm-project/libcxx/branches/release_40/include/__tree?rev=294103&r1=294102&r2=294103&view=diff
==============================================================================
--- libcxx/branches/release_40/include/__tree (original)
+++ libcxx/branches/release_40/include/__tree Sat Feb 4 16:36:27 2017
@@ -17,6 +17,8 @@
#include <stdexcept>
#include <algorithm>
+#include <__undef_min_max>
+
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
Added: libcxx/branches/release_40/test/libcxx/containers/associative/undef_min_max.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/branches/release_40/test/libcxx/containers/associative/undef_min_max.pass.cpp?rev=294103&view=auto
==============================================================================
--- libcxx/branches/release_40/test/libcxx/containers/associative/undef_min_max.pass.cpp (added)
+++ libcxx/branches/release_40/test/libcxx/containers/associative/undef_min_max.pass.cpp Sat Feb 4 16:36:27 2017
@@ -0,0 +1,22 @@
+//===----------------------------------------------------------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-W#warnings"
+#endif
+
+#define min THIS IS A NASTY MACRO!
+#define max THIS IS A NASTY MACRO!
+
+#include <map>
+
+int main() {
+ std::map<int, int> m;
+ ((void)m);
+}
More information about the cfe-commits
mailing list