//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // Test that headers are not tripped up by the surrounding code defining the // min() and max() macros. // The system-provided seems to be broken on AIX // XFAIL: LIBCXX-AIX-FIXME // Prevent from generating deprecated warnings for this test. #if defined(__DEPRECATED) # undef __DEPRECATED #endif #define TEST_MACROS() static_assert(min() == true && max() == true, "") #define min() true #define max() true /* BEGIN-SCRIPT for header in public_headers: print("{}#{}include <{}>\nTEST_MACROS();{}".format( '#if ' + header_restrictions[header] + '\n' if header in header_restrictions else '', 3 * ' ' if header in header_restrictions else '', header, '\n#endif' if header in header_restrictions else '' )) END-SCRIPT */ // DO NOT MANUALLY EDIT ANYTHING BETWEEN THE MARKERS BELOW // GENERATED-MARKER #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_THREADS) # include TEST_MACROS(); #endif #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include TEST_MACROS(); #endif #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include TEST_MACROS(); #endif #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS) # include TEST_MACROS(); #endif #if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS) # include TEST_MACROS(); #endif #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) # include TEST_MACROS(); #endif #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) && !defined(_LIBCPP_HAS_NO_FSTREAM) # include TEST_MACROS(); #endif #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_THREADS) # include TEST_MACROS(); #endif #include TEST_MACROS(); #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include TEST_MACROS(); #endif #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include TEST_MACROS(); #endif #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include TEST_MACROS(); #endif #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include TEST_MACROS(); #endif #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_THREADS) # include TEST_MACROS(); #endif #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include TEST_MACROS(); #endif #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include TEST_MACROS(); #endif #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_THREADS) # include TEST_MACROS(); #endif #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include TEST_MACROS(); #endif #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include TEST_MACROS(); #endif #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_THREADS) # include TEST_MACROS(); #endif #include TEST_MACROS(); #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_THREADS) # include TEST_MACROS(); #endif #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include TEST_MACROS(); #endif #include TEST_MACROS(); #if __cplusplus > 202002L && !defined(_LIBCPP_HAS_NO_THREADS) # include TEST_MACROS(); #endif #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include TEST_MACROS(); #endif #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) # include TEST_MACROS(); #endif #include TEST_MACROS(); #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_THREADS) # include TEST_MACROS(); #endif #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); #if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS) # include TEST_MACROS(); #endif #if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS) # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES) # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #if __cplusplus >= 201103L # include TEST_MACROS(); #endif #include TEST_MACROS(); #include TEST_MACROS(); // GENERATED-MARKER