1 //===----------------------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // Ensure that none of the standard C++ headers implicitly include cassert or 10 // assert.h (because assert() is implemented as a macro). 11 12 // The system-provided <uchar.h> seems to be broken on AIX 13 // XFAIL: LIBCXX-AIX-FIXME 14 15 // Prevent <ext/hash_map> from generating deprecated warnings for this test. 16 #if defined(__DEPRECATED) 17 # undef __DEPRECATED 18 #endif 19 20 /* 21 BEGIN-SCRIPT 22 23 for header in public_headers: 24 if header == 'cassert': 25 continue 26 print("{}#{}include <{}>{}".format( 27 '#if ' + header_restrictions[header] + '\n' if header in header_restrictions else '', 28 3 * ' ' if header in header_restrictions else '', 29 header, 30 '\n#endif' if header in header_restrictions else '' 31 )) 32 33 END-SCRIPT 34 */ 35 36 // DO NOT MANUALLY EDIT ANYTHING BETWEEN THE MARKERS BELOW 37 // GENERATED-MARKER 38 #include <algorithm> 39 #include <any> 40 #include <array> 41 #include <atomic> 42 #if !defined(_LIBCPP_HAS_NO_THREADS) 43 # include <barrier> 44 #endif 45 #include <bit> 46 #include <bitset> 47 #include <ccomplex> 48 #include <cctype> 49 #include <cerrno> 50 #include <cfenv> 51 #include <cfloat> 52 #include <charconv> 53 #include <chrono> 54 #include <cinttypes> 55 #include <ciso646> 56 #include <climits> 57 #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) 58 # include <clocale> 59 #endif 60 #include <cmath> 61 #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) 62 # include <codecvt> 63 #endif 64 #include <compare> 65 #include <complex> 66 #include <complex.h> 67 #include <concepts> 68 #include <condition_variable> 69 #include <coroutine> 70 #include <csetjmp> 71 #include <csignal> 72 #include <cstdarg> 73 #include <cstdbool> 74 #include <cstddef> 75 #include <cstdint> 76 #include <cstdio> 77 #include <cstdlib> 78 #include <cstring> 79 #include <ctgmath> 80 #include <ctime> 81 #include <ctype.h> 82 #include <cuchar> 83 #if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS) 84 # include <cwchar> 85 #endif 86 #if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS) 87 # include <cwctype> 88 #endif 89 #include <deque> 90 #include <errno.h> 91 #include <exception> 92 #include <execution> 93 #include <fenv.h> 94 #if !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) 95 # include <filesystem> 96 #endif 97 #include <float.h> 98 #include <format> 99 #include <forward_list> 100 #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) 101 # include <fstream> 102 #endif 103 #include <functional> 104 #if !defined(_LIBCPP_HAS_NO_THREADS) 105 # include <future> 106 #endif 107 #include <initializer_list> 108 #include <inttypes.h> 109 #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) 110 # include <iomanip> 111 #endif 112 #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) 113 # include <ios> 114 #endif 115 #include <iosfwd> 116 #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) 117 # include <iostream> 118 #endif 119 #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) 120 # include <istream> 121 #endif 122 #include <iterator> 123 #if !defined(_LIBCPP_HAS_NO_THREADS) 124 # include <latch> 125 #endif 126 #include <limits> 127 #include <limits.h> 128 #include <list> 129 #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) 130 # include <locale> 131 #endif 132 #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) 133 # include <locale.h> 134 #endif 135 #include <map> 136 #include <math.h> 137 #include <memory> 138 #if !defined(_LIBCPP_HAS_NO_THREADS) 139 # include <mutex> 140 #endif 141 #include <new> 142 #include <numbers> 143 #include <numeric> 144 #include <optional> 145 #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) 146 # include <ostream> 147 #endif 148 #include <queue> 149 #include <random> 150 #include <ranges> 151 #include <ratio> 152 #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) 153 # include <regex> 154 #endif 155 #include <scoped_allocator> 156 #if !defined(_LIBCPP_HAS_NO_THREADS) 157 # include <semaphore> 158 #endif 159 #include <set> 160 #include <setjmp.h> 161 #if !defined(_LIBCPP_HAS_NO_THREADS) 162 # include <shared_mutex> 163 #endif 164 #include <span> 165 #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) 166 # include <sstream> 167 #endif 168 #include <stack> 169 #if __cplusplus > 202002L && !defined(_LIBCPP_HAS_NO_THREADS) 170 # include <stdatomic.h> 171 #endif 172 #include <stdbool.h> 173 #include <stddef.h> 174 #include <stdexcept> 175 #include <stdint.h> 176 #include <stdio.h> 177 #include <stdlib.h> 178 #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) 179 # include <streambuf> 180 #endif 181 #include <string> 182 #include <string.h> 183 #include <string_view> 184 #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) 185 # include <strstream> 186 #endif 187 #include <system_error> 188 #include <tgmath.h> 189 #if !defined(_LIBCPP_HAS_NO_THREADS) 190 # include <thread> 191 #endif 192 #include <tuple> 193 #include <type_traits> 194 #include <typeindex> 195 #include <typeinfo> 196 #include <uchar.h> 197 #include <unordered_map> 198 #include <unordered_set> 199 #include <utility> 200 #include <valarray> 201 #include <variant> 202 #include <vector> 203 #include <version> 204 #if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS) 205 # include <wchar.h> 206 #endif 207 #if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS) 208 # include <wctype.h> 209 #endif 210 #if __cplusplus >= 201103L 211 # include <experimental/algorithm> 212 #endif 213 #if __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES) 214 # include <experimental/coroutine> 215 #endif 216 #if __cplusplus >= 201103L 217 # include <experimental/deque> 218 #endif 219 #if __cplusplus >= 201103L 220 # include <experimental/forward_list> 221 #endif 222 #if __cplusplus >= 201103L 223 # include <experimental/functional> 224 #endif 225 #if __cplusplus >= 201103L 226 # include <experimental/iterator> 227 #endif 228 #if __cplusplus >= 201103L 229 # include <experimental/list> 230 #endif 231 #if __cplusplus >= 201103L 232 # include <experimental/map> 233 #endif 234 #if __cplusplus >= 201103L 235 # include <experimental/memory_resource> 236 #endif 237 #if __cplusplus >= 201103L 238 # include <experimental/propagate_const> 239 #endif 240 #if !defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L 241 # include <experimental/regex> 242 #endif 243 #if __cplusplus >= 201103L 244 # include <experimental/set> 245 #endif 246 #if __cplusplus >= 201103L 247 # include <experimental/simd> 248 #endif 249 #if __cplusplus >= 201103L 250 # include <experimental/string> 251 #endif 252 #if __cplusplus >= 201103L 253 # include <experimental/type_traits> 254 #endif 255 #if __cplusplus >= 201103L 256 # include <experimental/unordered_map> 257 #endif 258 #if __cplusplus >= 201103L 259 # include <experimental/unordered_set> 260 #endif 261 #if __cplusplus >= 201103L 262 # include <experimental/utility> 263 #endif 264 #if __cplusplus >= 201103L 265 # include <experimental/vector> 266 #endif 267 #include <ext/hash_map> 268 #include <ext/hash_set> 269 // GENERATED-MARKER 270 271 #ifdef assert 272 #error "Do not include cassert or assert.h in standard header files" 273 #endif 274