1// -*- C++ -*- 2//===----------------------------------------------------------------------===// 3// 4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5// See https://llvm.org/LICENSE.txt for license information. 6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7// 8//===----------------------------------------------------------------------===// 9 10 11#ifdef min 12#if !defined(_LIBCPP_DISABLE_MACRO_CONFLICT_WARNINGS) 13#if defined(_LIBCPP_WARNING) 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_WARNING) 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