diff options
| author | Eric Fiselier <eric@efcs.ca> | 2017-02-04 20:27:46 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2017-02-04 20:27:46 +0000 |
| commit | fb5c750222c63e882bbb5ea9ed15127038152bba (patch) | |
| tree | 8aa3373ca875b44fb14c3e2f8f4249a39f88d60f /libcxx | |
| parent | ec49313b113bb1086ab250e4d83be250ee010ea0 (diff) | |
| download | bcm5719-llvm-fb5c750222c63e882bbb5ea9ed15127038152bba.tar.gz bcm5719-llvm-fb5c750222c63e882bbb5ea9ed15127038152bba.zip | |
Undefine min/max in __tree
llvm-svn: 294099
Diffstat (limited to 'libcxx')
| -rw-r--r-- | libcxx/include/__tree | 2 | ||||
| -rw-r--r-- | libcxx/test/libcxx/containers/associative/undef_min_max.pass.cpp | 22 |
2 files changed, 24 insertions, 0 deletions
diff --git a/libcxx/include/__tree b/libcxx/include/__tree index 170d4c0b308..708fe97cb68 100644 --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -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 diff --git a/libcxx/test/libcxx/containers/associative/undef_min_max.pass.cpp b/libcxx/test/libcxx/containers/associative/undef_min_max.pass.cpp new file mode 100644 index 00000000000..b108f0ce573 --- /dev/null +++ b/libcxx/test/libcxx/containers/associative/undef_min_max.pass.cpp @@ -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); +} |

