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 // Ensure that none of the standard C++ headers implicitly include cassert or 11 // assert.h (because assert() is implemented as a macro). 12 13 // GCC 5 has incomplete support for C++17, so some headers fail when included. 14 // UNSUPPORTED: gcc-5 && c++17 15 16 // Prevent <ext/hash_map> from generating deprecated warnings for this test. 17 #if defined(__DEPRECATED) 18 #undef __DEPRECATED 19 #endif 20 21 // Top level headers 22 #include <algorithm> 23 #include <any> 24 #include <array> 25 #ifndef _LIBCPP_HAS_NO_THREADS 26 #include <atomic> 27 #endif 28 #ifndef _LIBCPP_HAS_NO_THREADS 29 #include <barrier> 30 #endif 31 #include <bit> 32 #include <bitset> 33 #include <ccomplex> 34 #include <cctype> 35 #include <cerrno> 36 #include <cfenv> 37 #include <cfloat> 38 #include <charconv> 39 #include <chrono> 40 #include <cinttypes> 41 #include <ciso646> 42 #include <climits> 43 #include <cmath> 44 #include <compare> 45 #include <complex> 46 #include <complex.h> 47 #include <concepts> 48 #include <condition_variable> 49 #include <csetjmp> 50 #include <csignal> 51 #include <cstdarg> 52 #include <cstdbool> 53 #include <cstddef> 54 #include <cstdint> 55 #include <cstdio> 56 #include <cstdlib> 57 #include <cstring> 58 #include <ctgmath> 59 #include <ctime> 60 #include <ctype.h> 61 #include <cwchar> 62 #include <cwctype> 63 #include <deque> 64 #include <errno.h> 65 #include <exception> 66 #include <execution> 67 #include <fenv.h> 68 #include <filesystem> 69 #include <float.h> 70 #include <forward_list> 71 #include <functional> 72 #ifndef _LIBCPP_HAS_NO_THREADS 73 #include <future> 74 #endif 75 #include <initializer_list> 76 #include <inttypes.h> 77 #include <iosfwd> 78 #include <iterator> 79 #ifndef _LIBCPP_HAS_NO_THREADS 80 #include <latch> 81 #endif 82 #include <limits> 83 #include <limits.h> 84 #include <list> 85 #include <map> 86 #include <math.h> 87 #include <memory> 88 #ifndef _LIBCPP_HAS_NO_THREADS 89 #include <mutex> 90 #endif 91 #include <new> 92 #include <numbers> 93 #include <numeric> 94 #include <optional> 95 #include <queue> 96 #include <random> 97 #include <ratio> 98 #include <scoped_allocator> 99 #ifndef _LIBCPP_HAS_NO_THREADS 100 #include <semaphore> 101 #endif 102 #include <set> 103 #include <setjmp.h> 104 #ifndef _LIBCPP_HAS_NO_THREADS 105 #include <shared_mutex> 106 #endif 107 #include <span> 108 #include <stack> 109 #include <stdbool.h> 110 #include <stddef.h> 111 #include <stdexcept> 112 #include <stdint.h> 113 #include <stdio.h> 114 #include <stdlib.h> 115 #include <string> 116 #include <string.h> 117 #include <string_view> 118 #include <system_error> 119 #include <tgmath.h> 120 #ifndef _LIBCPP_HAS_NO_THREADS 121 #include <thread> 122 #endif 123 #include <tuple> 124 #include <typeindex> 125 #include <typeinfo> 126 #include <type_traits> 127 #include <unordered_map> 128 #include <unordered_set> 129 #include <utility> 130 #include <valarray> 131 #include <variant> 132 #include <vector> 133 #include <version> 134 #include <wchar.h> 135 #include <wctype.h> 136 137 #ifndef _LIBCPP_HAS_NO_LOCALIZATION 138 # include <clocale> 139 # include <codecvt> 140 # include <fstream> 141 # include <iomanip> 142 # include <ios> 143 # include <iostream> 144 # include <istream> 145 # include <locale> 146 # include <locale.h> 147 # include <ostream> 148 # include <regex> 149 # include <sstream> 150 # include <streambuf> 151 # include <strstream> 152 # if __cplusplus >= 201103L 153 # include <experimental/regex> 154 # endif 155 #endif 156 157 // experimental headers 158 #if __cplusplus >= 201103L 159 #include <experimental/algorithm> 160 #if defined(__cpp_coroutines) 161 #include <experimental/coroutine> 162 #endif 163 #include <experimental/deque> 164 #include <experimental/filesystem> 165 #include <experimental/forward_list> 166 #include <experimental/functional> 167 #include <experimental/iterator> 168 #include <experimental/list> 169 #include <experimental/map> 170 #include <experimental/memory_resource> 171 #include <experimental/propagate_const> 172 #include <experimental/set> 173 #include <experimental/simd> 174 #include <experimental/string> 175 #include <experimental/type_traits> 176 #include <experimental/unordered_map> 177 #include <experimental/unordered_set> 178 #include <experimental/utility> 179 #include <experimental/vector> 180 #endif // __cplusplus >= 201103L 181 182 // extended headers 183 #include <ext/hash_map> 184 #include <ext/hash_set> 185 186 #ifdef assert 187 #error "Do not include cassert or assert.h in standard header files" 188 #endif 189