|
82 | 82 | #include <clocale>
|
83 | 83 | #include <cmath>
|
84 | 84 | #include <codecvt>
|
85 |
| - #include <condition_variable> |
86 | 85 | #include <compare>
|
87 | 86 | #include <complex>
|
88 | 87 | #include <concepts>
|
| 88 | + #include <condition_variable> |
89 | 89 | #ifdef __cpp_lib_coroutine
|
90 | 90 | #include <coroutine>
|
91 | 91 | #endif
|
|
113 | 113 | // in our -pure-cpp2 "import std;" simulation mode... if you need this,
|
114 | 114 | // use mixed mode (not -pure-cpp2) and #include all the headers you need
|
115 | 115 | // including this one
|
116 |
| - // |
| 116 | + // |
117 | 117 | // #include <execution>
|
118 | 118 | #include <filesystem>
|
119 | 119 | #if defined(__cpp_lib_format) || (defined(_MSC_VER) && _MSC_VER >= 1929)
|
|
153 | 153 | #include <ranges>
|
154 | 154 | #include <ratio>
|
155 | 155 | #include <regex>
|
156 |
| - #ifdef __cpp_lib_source_location |
157 |
| - #include <source_location> |
158 |
| - #endif |
159 | 156 | #include <scoped_allocator>
|
160 | 157 | #ifdef __cpp_lib_semaphore
|
161 | 158 | #include <semaphore>
|
162 | 159 | #endif
|
163 | 160 | #include <set>
|
164 | 161 | #include <shared_mutex>
|
| 162 | + #ifdef __cpp_lib_source_location |
| 163 | + #include <source_location> |
| 164 | + #endif |
165 | 165 | #include <span>
|
166 | 166 | #ifdef __cpp_lib_spanstream
|
167 | 167 | #include <spanstream>
|
|
197 | 197 | // Otherwise, we're not in -pure-cpp2 and so just #include
|
198 | 198 | // what we need in this header to make this self-contained
|
199 | 199 | #else
|
| 200 | + #include <version> // has the _cpp_* preprocessor defs, include first |
200 | 201 | #include <algorithm>
|
201 | 202 | #include <any>
|
| 203 | + #include <array> |
| 204 | + #include <atomic> |
| 205 | + #ifdef __cpp_lib_barrier |
| 206 | + #include <barrier> |
| 207 | + #endif |
| 208 | + #include <bit> |
| 209 | + #include <bitset> |
| 210 | + #include <cassert> |
| 211 | + #include <cctype> |
| 212 | + #include <cerrno> |
| 213 | + #include <cfenv> |
| 214 | + #include <cfloat> |
| 215 | + #include <charconv> |
| 216 | + #include <chrono> |
| 217 | + #include <cinttypes> |
| 218 | + #include <climits> |
| 219 | + #include <clocale> |
| 220 | + #include <cmath> |
| 221 | + #include <codecvt> |
202 | 222 | #include <compare>
|
| 223 | + #include <complex> |
203 | 224 | #include <concepts>
|
| 225 | + #include <condition_variable> |
| 226 | + #ifdef __cpp_lib_coroutine |
| 227 | + #include <coroutine> |
| 228 | + #endif |
| 229 | + #include <csetjmp> |
| 230 | + #include <csignal> |
| 231 | + #include <cstdarg> |
204 | 232 | #include <cstddef>
|
205 | 233 | #include <cstdint>
|
206 | 234 | #include <cstdio>
|
| 235 | + #include <cstdlib> |
| 236 | + #include <cstring> |
| 237 | + #include <ctime> |
| 238 | + #if __has_include(<cuchar>) |
| 239 | + #include <cuchar> |
| 240 | + #endif |
| 241 | + #include <cwchar> |
| 242 | + #include <cwctype> |
| 243 | + #include <deque> |
207 | 244 | #ifndef CPP2_NO_EXCEPTIONS
|
208 | 245 | #include <exception>
|
209 | 246 | #endif
|
| 247 | + #include <filesystem> |
210 | 248 | #if defined(__cpp_lib_format) || (defined(_MSC_VER) && _MSC_VER >= 1929)
|
211 | 249 | #include <format>
|
212 | 250 | #endif
|
| 251 | + #include <forward_list> |
| 252 | + #include <fstream> |
| 253 | + #include <functional> |
| 254 | + #include <future> |
| 255 | + #include <initializer_list> |
| 256 | + #include <iomanip> |
| 257 | + #include <ios> |
| 258 | + #include <iosfwd> |
213 | 259 | #include <iostream>
|
| 260 | + #include <iso646.h> |
| 261 | + #include <istream> |
214 | 262 | #include <iterator>
|
| 263 | + #ifdef __cpp_lib_latch |
| 264 | + #include <latch> |
| 265 | + #endif |
215 | 266 | #include <limits>
|
| 267 | + #include <list> |
| 268 | + #include <locale> |
| 269 | + #include <map> |
216 | 270 | #include <memory>
|
| 271 | + #ifdef __cpp_lib_memory_resource |
| 272 | + #include <memory_resource> |
| 273 | + #endif |
| 274 | + #include <mutex> |
217 | 275 | #include <new>
|
218 |
| - #include <random> |
| 276 | + #include <numbers> |
| 277 | + #include <numeric> |
219 | 278 | #include <optional>
|
| 279 | + #include <ostream> |
| 280 | + #include <queue> |
| 281 | + #include <random> |
| 282 | + #include <ranges> |
| 283 | + #include <ratio> |
| 284 | + #include <regex> |
| 285 | + #include <scoped_allocator> |
| 286 | + #ifdef __cpp_lib_semaphore |
| 287 | + #include <semaphore> |
| 288 | + #endif |
| 289 | + #include <set> |
| 290 | + #include <shared_mutex> |
220 | 291 | #if defined(CPP2_USE_SOURCE_LOCATION)
|
221 | 292 | #include <source_location>
|
222 | 293 | #endif
|
223 | 294 | #include <span>
|
| 295 | + #ifdef __cpp_lib_spanstream |
| 296 | + #include <spanstream> |
| 297 | + #endif |
| 298 | + #include <sstream> |
| 299 | + #include <stack> |
| 300 | + #include <stdexcept> |
| 301 | + #ifdef __cpp_lib_jthread |
| 302 | + #include <stop_token> |
| 303 | + #endif |
| 304 | + #include <streambuf> |
224 | 305 | #include <string>
|
225 | 306 | #include <string_view>
|
| 307 | + #ifdef __cpp_lib_syncstream |
| 308 | + #include <syncstream> |
| 309 | + #endif |
226 | 310 | #include <system_error>
|
| 311 | + #include <thread> |
227 | 312 | #include <tuple>
|
228 | 313 | #include <type_traits>
|
| 314 | + #include <typeindex> |
229 | 315 | #ifndef CPP2_NO_RTTI
|
230 | 316 | #include <typeinfo>
|
231 | 317 | #endif
|
| 318 | + #include <unordered_map> |
| 319 | + #include <unordered_set> |
232 | 320 | #include <utility>
|
| 321 | + #include <valarray> |
233 | 322 | #include <variant>
|
234 | 323 | #include <vector>
|
235 | 324 | #endif
|
@@ -483,7 +572,7 @@ template<typename T>
|
483 | 572 | auto Typeid() -> decltype(auto) {
|
484 | 573 | #ifdef CPP2_NO_RTTI
|
485 | 574 | Type.expects(
|
486 |
| - !"'any' dynamic casting is disabled with -fno-rtti", // more likely to appear on console |
| 575 | + !"'any' dynamic casting is disabled with -fno-rtti", // more likely to appear on console |
487 | 576 | "'any' dynamic casting is disabled with -fno-rtti" // make message available to hooked handlers
|
488 | 577 | );
|
489 | 578 | #else
|
@@ -829,7 +918,7 @@ inline auto to_string(std::string const& s) -> std::string const&
|
829 | 918 |
|
830 | 919 | template<typename T>
|
831 | 920 | inline auto to_string(T const& sv) -> std::string
|
832 |
| - requires (std::is_convertible_v<T, std::string_view> |
| 921 | + requires (std::is_convertible_v<T, std::string_view> |
833 | 922 | && !std::is_convertible_v<T, const char*>)
|
834 | 923 | {
|
835 | 924 | return std::string{sv};
|
@@ -969,17 +1058,17 @@ auto is( X const& ) -> bool {
|
969 | 1058 |
|
970 | 1059 | template< typename C, typename X >
|
971 | 1060 | requires (
|
972 |
| - ( std::is_base_of_v<X, C> || |
973 |
| - ( std::is_polymorphic_v<C> && std::is_polymorphic_v<X>) |
| 1061 | + ( std::is_base_of_v<X, C> || |
| 1062 | + ( std::is_polymorphic_v<C> && std::is_polymorphic_v<X>) |
974 | 1063 | ) && !std::is_same_v<C,X>)
|
975 | 1064 | auto is( X const& x ) -> bool {
|
976 | 1065 | return Dynamic_cast<C const*>(&x) != nullptr;
|
977 | 1066 | }
|
978 | 1067 |
|
979 | 1068 | template< typename C, typename X >
|
980 | 1069 | requires (
|
981 |
| - ( std::is_base_of_v<X, C> || |
982 |
| - ( std::is_polymorphic_v<C> && std::is_polymorphic_v<X>) |
| 1070 | + ( std::is_base_of_v<X, C> || |
| 1071 | + ( std::is_polymorphic_v<C> && std::is_polymorphic_v<X>) |
983 | 1072 | ) && !std::is_same_v<C,X>)
|
984 | 1073 | auto is( X const* x ) -> bool {
|
985 | 1074 | return Dynamic_cast<C const*>(x) != nullptr;
|
@@ -1610,7 +1699,7 @@ constexpr auto unsafe_narrow( X&& x ) noexcept -> decltype(auto)
|
1610 | 1699 | // Returns a function object that takes a 'value' of the same type as
|
1611 | 1700 | // 'flags', and evaluates to true if and only if 'value' has set all of
|
1612 | 1701 | // the bits set in 'flags'
|
1613 |
| -// |
| 1702 | +// |
1614 | 1703 | //-----------------------------------------------------------------------
|
1615 | 1704 | //
|
1616 | 1705 | template <typename T>
|
|
0 commit comments