| Howard Hinnant | 66c6f97 | 2011-11-29 16:45:27 | [diff] [blame] | 1 | // -*- C++ -*- |
| Eric Fiselier | 018a3d5 | 2017-05-31 22:07:49 | [diff] [blame] | 2 | //===------------------------ __undef_macros ------------------------------===// |
| Howard Hinnant | 66c6f97 | 2011-11-29 16:45:27 | [diff] [blame] | 3 | // |
| 4 | // The LLVM Compiler Infrastructure |
| 5 | // |
| Eric Fiselier | 018a3d5 | 2017-05-31 22:07:49 | [diff] [blame] | 6 | // This file is distributed under the University of Illinois Open Source |
| 7 | // License. See LICENSE.TXT for details. |
| Howard Hinnant | 66c6f97 | 2011-11-29 16:45:27 | [diff] [blame] | 8 | // |
| 9 | //===----------------------------------------------------------------------===// |
| 10 | |
| Eric Fiselier | 018a3d5 | 2017-05-31 22:07:49 | [diff] [blame] | 11 | |
| Howard Hinnant | 66c6f97 | 2011-11-29 16:45:27 | [diff] [blame] | 12 | #ifdef min |
| Saleem Abdulrasool | ab008f7 | 2016-07-12 14:39:13 | [diff] [blame] | 13 | #if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS) |
| Eric Fiselier | ab2f54f | 2017-05-10 21:40:58 | [diff] [blame] | 14 | #if defined(_LIBCPP_WARNING) |
| Yaron Keren | 1823bea | 2013-11-15 23:41:01 | [diff] [blame] | 15 | _LIBCPP_WARNING("macro min is incompatible with C++. Try #define NOMINMAX " |
| 16 | "before any Windows header. #undefing min") |
| Howard Hinnant | f755506 | 2013-10-04 21:14:44 | [diff] [blame] | 17 | #else |
| Howard Hinnant | 460b4ca | 2012-09-03 18:13:11 | [diff] [blame] | 18 | #warning: macro min is incompatible with C++. #undefing min |
| Howard Hinnant | f755506 | 2013-10-04 21:14:44 | [diff] [blame] | 19 | #endif |
| Saleem Abdulrasool | ab008f7 | 2016-07-12 14:39:13 | [diff] [blame] | 20 | #endif |
| Howard Hinnant | 66c6f97 | 2011-11-29 16:45:27 | [diff] [blame] | 21 | #undef min |
| 22 | #endif |
| 23 | |
| 24 | #ifdef max |
| Saleem Abdulrasool | ab008f7 | 2016-07-12 14:39:13 | [diff] [blame] | 25 | #if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS) |
| Eric Fiselier | ab2f54f | 2017-05-10 21:40:58 | [diff] [blame] | 26 | #if defined(_LIBCPP_WARNING) |
| Yaron Keren | 1823bea | 2013-11-15 23:41:01 | [diff] [blame] | 27 | _LIBCPP_WARNING("macro max is incompatible with C++. Try #define NOMINMAX " |
| 28 | "before any Windows header. #undefing max") |
| Howard Hinnant | f755506 | 2013-10-04 21:14:44 | [diff] [blame] | 29 | #else |
| Howard Hinnant | 460b4ca | 2012-09-03 18:13:11 | [diff] [blame] | 30 | #warning: macro max is incompatible with C++. #undefing max |
| Howard Hinnant | f755506 | 2013-10-04 21:14:44 | [diff] [blame] | 31 | #endif |
| Saleem Abdulrasool | ab008f7 | 2016-07-12 14:39:13 | [diff] [blame] | 32 | #endif |
| Howard Hinnant | 66c6f97 | 2011-11-29 16:45:27 | [diff] [blame] | 33 | #undef max |
| 34 | #endif |