Home | History | Annotate | Download | only in v1
      1 // -*- C++ -*-
      2 //===----------------------------------------------------------------------===//
      3 //
      4 //                     The LLVM Compiler Infrastructure
      5 //
      6 // This file is dual licensed under the MIT and the University of Illinois Open
      7 // Source Licenses. See LICENSE.TXT for details.
      8 //
      9 //===----------------------------------------------------------------------===//
     10 
     11 #ifdef min
     12 #if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
     13 #if defined(_LIBCPP_MSVC)
     14 _LIBCPP_WARNING("macro min is incompatible with C++.  Try #define NOMINMAX "
     15                 "before any Windows header. #undefing min")
     16 #else
     17 #warning: macro min is incompatible with C++.  #undefing min
     18 #endif
     19 #endif
     20 #undef min
     21 #endif
     22 
     23 #ifdef max
     24 #if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS)
     25 #if defined(_LIBCPP_MSVC)
     26 _LIBCPP_WARNING("macro max is incompatible with C++.  Try #define NOMINMAX "
     27                 "before any Windows header. #undefing max")
     28 #else
     29 #warning: macro max is incompatible with C++.  #undefing max
     30 #endif
     31 #endif
     32 #undef max
     33 #endif
     34