1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803 | //======================================================================
//-----------------------------------------------------------------------
/**
* @file iutest_stdlib_defs.hpp
* @brief stdlib detect defines
*
* @author t.shirayanagi
* @par copyright
* Copyright (C) 2012-2023, Takazumi Shirayanagi\n
* This software is released under the new BSD License,
* see LICENSE
*/
//-----------------------------------------------------------------------
//======================================================================
#ifndef INCG_IRIS_IUTEST_STDLIB_DEFS_HPP_9C62C097_E5FB_49EE_9329_811F32C846A2_
#define INCG_IRIS_IUTEST_STDLIB_DEFS_HPP_9C62C097_E5FB_49EE_9329_811F32C846A2_
//======================================================================
// include
// IWYU pragma: begin_exports
#include "iutest_compiler.hpp"
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
#if defined(IUTEST_USE_GTEST) && defined(__STRICT_ANSI__)
# undef __STRICT_ANSI__
# include <string.h>
# include <stdlib.h>
# include <cstdio>
# define __STRICT_ANSI__
#endif
#if !defined(_MSC_VER)
# include <stdint.h>
#endif
#include <cstdlib>
#include <cstddef>
#include <limits>
#include <complex>
// <version> header
#if !defined(IUTEST_HAS_CXX_HDR_VERSION)
# if defined(__has_include)
# if __has_include(<version>)<--- failed to evaluate #if condition
# define IUTEST_HAS_CXX_HDR_VERSION 1
# endif
# endif
#endif
#if !defined(IUTEST_HAS_CXX_HDR_VERSION)
# define IUTEST_HAS_CXX_HDR_VERSION 0
#endif
#if IUTEST_HAS_CXX_HDR_VERSION
#include <version>
#endif
// IWYU pragma: end_exports
//======================================================================
// define
#if defined(__GLIBCPP__) || defined(__GLIBCXX__)
// libstdc++
#if defined(__clang__)
# if __has_include(<experimental/memory_resource>)
# define IUTEST_LIBSTDCXX_VERSION 60100
# elif __has_include(<experimental/any>)
# define IUTEST_LIBSTDCXX_VERSION 50100
# elif __has_include(<shared_mutex>)
# define IUTEST_LIBSTDCXX_VERSION 40900
# elif __has_include(<ext/cmath>)
# define IUTEST_LIBSTDCXX_VERSION 40800
# elif __has_include(<scoped_allocator>)
# define IUTEST_LIBSTDCXX_VERSION 40700
# elif __has_include(<typeindex>)
# define IUTEST_LIBSTDCXX_VERSION 40600
# elif __has_include(<future>)
# define IUTEST_LIBSTDCXX_VERSION 40500
# elif __has_include(<ratio>)
# define IUTEST_LIBSTDCXX_VERSION 40400
# elif __has_include(<array>)
# define IUTEST_LIBSTDCXX_VERSION 40300
# endif
#elif defined(__GNUC__)
# define IUTEST_LIBSTDCXX_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
#endif
#if IUTEST_HAS_CXX11
# if IUTEST_LIBSTDCXX_VERSION >= 60100
# if !defined(IUTEST_HAS_STD_INVOKE) && IUTEST_HAS_CXX1Z
# define IUTEST_HAS_STD_INVOKE 1
# endif
# endif
# if IUTEST_LIBSTDCXX_VERSION >= 50100
# if !defined(IUTEST_HAS_CXX_HDR_CODECVT)
# define IUTEST_HAS_CXX_HDR_CODECVT 1
# endif
# endif
# if IUTEST_LIBSTDCXX_VERSION >= 40900
# if !defined(IUTEST_HAS_CXX_HDR_REGEX)
# define IUTEST_HAS_CXX_HDR_REGEX 1
# endif
# endif
# if IUTEST_LIBSTDCXX_VERSION >= 40700
# if !defined(IUTEST_HAS_STD_EMPLACE)
# define IUTEST_HAS_STD_EMPLACE 1
# endif
# if !defined(IUTEST_HAS_CXX_HDR_CHRONO)
# define IUTEST_HAS_CXX_HDR_CHRONO 1
# endif
# endif
# if IUTEST_LIBSTDCXX_VERSION >= 40600
# if !defined(IUTEST_HAS_STD_BEGIN_END)
# define IUTEST_HAS_STD_BEGIN_END 1
# endif
# endif
# if IUTEST_LIBSTDCXX_VERSION >= 40500
# if !defined(IUTEST_HAS_STD_DECLVAL)
# define IUTEST_HAS_STD_DECLVAL 1
# endif
# if !defined(IUTEST_HAS_CXX_HDR_RANDOM)
# define IUTEST_HAS_CXX_HDR_RANDOM 1
# endif
# if !defined(IUTEST_HAS_CXX_HDR_CSTDINT)
# define IUTEST_HAS_CXX_HDR_CSTDINT 1
# endif
# endif
# if IUTEST_LIBSTDCXX_VERSION >= 40300
# if !defined(IUTEST_HAS_CXX_HDR_ARRAY)
# define IUTEST_HAS_CXX_HDR_ARRAY 1
# endif
# if !defined(IUTEST_HAS_STD_TUPLE)
# define IUTEST_HAS_STD_TUPLE 1
# endif
# endif
# if defined(_GLIBCXX_HAVE_QUICK_EXIT) && defined(_GLIBCXX_HAVE_AT_QUICK_EXIT)
# if !defined(IUTEST_HAS_STD_QUICK_EXIT)
# define IUTEST_HAS_STD_QUICK_EXIT 1
# endif
# endif
# if defined(__has_include)
# if !defined(IUTEST_HAS_CXX_HDR_CUCHAR) && __has_include( <cuchar> )
# if defined(_GLIBCXX_USE_C11_UCHAR_CXX11) && _GLIBCXX_USE_C11_UCHAR_CXX11
# define IUTEST_HAS_CXX_HDR_CUCHAR 1
# endif
# endif
# endif
#endif
#if !defined(IUTEST_HAS_STD_TUPLE)
# if (!defined(__CUDACC__) && !defined(__ARMCC_VERSION) && (IUTEST_LIBSTDCXX_VERSION >= 40000))
# if !defined(IUTEST_HAS_TR1_TUPLE)
# define IUTEST_HAS_TR1_TUPLE 1
# endif
# endif
#endif
#if !defined(IUTEST_HAS_HDR_CXXABI)
# if defined(__has_include)
# if __has_include( <cxxabi.h> )
# define IUTEST_HAS_HDR_CXXABI 1
# endif
# else
# define IUTEST_HAS_HDR_CXXABI 1
# endif
#endif
#if defined(__GNUC__) && !defined(__clang__)
// GCC 8.x requires linking with -lstdc++fs. (iutest not support)
# if (__GNUC__ < 9)
# define IUTEST_HAS_CXX_HDR_FILESYSTEM 0
# endif
#endif
#elif defined(_LIBCPP_VERSION)
// libc++
#if IUTEST_HAS_CXX11
# if !defined(IUTEST_HAS_STD_BEGIN_END)
# define IUTEST_HAS_STD_BEGIN_END 1
# endif
# if !defined(IUTEST_HAS_STD_DECLVAL)
# define IUTEST_HAS_STD_DECLVAL 1
# endif
# if !defined(IUTEST_HAS_STD_EMPLACE)
# define IUTEST_HAS_STD_EMPLACE 1
# endif
# if !defined(IUTEST_HAS_CXX_HDR_CHRONO)
# define IUTEST_HAS_CXX_HDR_CHRONO 1
# endif
# if !defined(IUTEST_HAS_CXX_HDR_REGEX)
# define IUTEST_HAS_CXX_HDR_REGEX 1
# endif
# if !defined(IUTEST_HAS_CXX_HDR_RANDOM)
# define IUTEST_HAS_CXX_HDR_RANDOM 1
# endif
# if !defined(IUTEST_HAS_CXX_HDR_CODECVT)
# define IUTEST_HAS_CXX_HDR_CODECVT 1
# endif
# if !defined(IUTEST_HAS_CXX_HDR_CSTDINT)
# define IUTEST_HAS_CXX_HDR_CSTDINT 1
# endif
# if !defined(IUTEST_HAS_CXX_HDR_ARRAY)
# define IUTEST_HAS_CXX_HDR_ARRAY 1
# endif
# if !defined(IUTEST_HAS_STD_QUICK_EXIT) && defined(_LIBCPP_HAS_QUICK_EXIT)
# if defined(__APPLE__)
# define IUTEST_HAS_STD_QUICK_EXIT 0 // xcode clang
# else
# define IUTEST_HAS_STD_QUICK_EXIT 1
# endif
# endif
# if defined(__has_include)
# if !defined(IUTEST_HAS_CXX_HDR_CUCHAR) && __has_include( <cuchar> )
# if defined(__APPLE__) && IUTEST_CLANG_MAJOR == 15
// https://github.com/llvm/llvm-project/issues/62573
# define IUTEST_HAS_CXX_HDR_CUCHAR 0
# else
# define IUTEST_HAS_CXX_HDR_CUCHAR 1
# endif
# endif
# if !defined(IUTEST_HAS_STD_TUPLE) && __has_include( <tuple> )
# define IUTEST_HAS_STD_TUPLE 1
# endif
# endif
#endif
#if _LIBCPP_VERSION < 9000
# define IUTEST_HAS_CXX_HDR_FILESYSTEM 0
#endif
#if _LIBCPP_VERSION >= 3700
# if !defined(IUTEST_HAS_STD_INVOKE) && IUTEST_HAS_CXX1Z
# define IUTEST_HAS_STD_INVOKE 1
# endif
#endif
#if _LIBCPP_VERSION >= 1001
# if !defined(IUTEST_HAS_STD_BEGIN_END)
# define IUTEST_HAS_STD_BEGIN_END 1
# endif
#endif
#if defined(__has_include)
# if !defined(IUTEST_HAS_STD_TUPLE) && !defined(IUTEST_HAS_TR1_TUPLE) && __has_include( <tr1/tuple> )
# define IUTEST_HAS_TR1_TUPLE 1
# endif
# if !defined(IUTEST_HAS_HDR_CXXABI) && __has_include( <cxxabi.h> )
# define IUTEST_HAS_HDR_CXXABI 1
# endif
#endif
#elif defined(_MSC_VER) && defined(_MSC_FULL_VER)
// Visual C++
#if _MSC_VER >= 1600
# if !defined(IUTEST_HAS_CXX_HDR_ARRAY)
# define IUTEST_HAS_CXX_HDR_ARRAY 1
# endif
#endif
#if _MSC_VER >= 1700
# if !defined(IUTEST_HAS_STD_BEGIN_END)
# define IUTEST_HAS_STD_BEGIN_END 1
# endif
# if !defined(IUTEST_HAS_STD_DECLVAL)
# define IUTEST_HAS_STD_DECLVAL IUTEST_HAS_DECLTYPE
# endif
# if !defined(IUTEST_HAS_STD_EMPLACE)
# define IUTEST_HAS_STD_EMPLACE 1
# endif
# if !defined(IUTEST_HAS_CXX_HDR_REGEX)
# define IUTEST_HAS_CXX_HDR_REGEX 1
# endif
# if !defined(IUTEST_HAS_CXX_HDR_RANDOM)
# define IUTEST_HAS_CXX_HDR_RANDOM 1
# endif
# if !defined(IUTEST_HAS_CXX_HDR_CODECVT)
# define IUTEST_HAS_CXX_HDR_CODECVT 1
# endif
# if !defined(IUTEST_HAS_CXX_HDR_CSTDINT)
# define IUTEST_HAS_CXX_HDR_CSTDINT 1
# endif
# if !defined(IUTEST_HAS_CXX_HDR_CHRONO) && _MSC_FULL_VER != 190023725
# define IUTEST_HAS_CXX_HDR_CHRONO 1
# endif
#endif
#if _MSC_VER >= 1900
# if !defined(IUTEST_HAS_STD_QUICK_EXIT)
# define IUTEST_HAS_STD_QUICK_EXIT 1
# endif
# if !defined(IUTEST_HAS_CXX_HDR_CUCHAR)
# define IUTEST_HAS_CXX_HDR_CUCHAR 1
# endif
#endif
#if _MSC_VER >= 1916
# if !defined(IUTEST_HAS_CXX_HDR_CHARCONV) && IUTEST_HAS_CXX17
# define IUTEST_HAS_CXX_HDR_CHARCONV 1
# endif
#endif
// tuple
#if (_MSC_VER > 1700) || (_MSC_VER == 1700 && _VARIADIC_MAX >= 9)
# if !defined(IUTEST_HAS_STD_TUPLE)
# define IUTEST_HAS_STD_TUPLE 1
# endif
#elif (_MSC_VER >= 1500) && (_MSC_VER < 1700) && (_MSC_FULL_VER > 150021022)
# if !defined(IUTEST_HAS_TR1_TUPLE)
# define IUTEST_HAS_TR1_TUPLE 1
# endif
#endif
#elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
// stlport
#endif
#if IUTEST_HAS_CXX1Z
// c++1z feature
#if defined(__has_include)
#if !defined(IUTEST_HAS_CXX_HDR_ANY)
# if __has_include(<any>)
# define IUTEST_HAS_CXX_HDR_ANY 1
# endif
#endif
#if !defined(IUTEST_HAS_CXX_HDR_CHARCONV)
# if __has_include(<charconv>)
# define IUTEST_HAS_CXX_HDR_CHARCONV 1
# endif
#endif
// apple(xcode) clang
#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
# if !IUTEST_HAS_CXX17
# define IUTEST_HAS_CXX_HDR_FILESYSTEM 0
# endif
# if __MAC_OS_X_VERSION_MIN_REQUIRED < 101500
# define IUTEST_HAS_CXX_HDR_FILESYSTEM 0
# endif
#endif
#if !defined(IUTEST_HAS_CXX_HDR_FILESYSTEM)
# if __has_include(<filesystem>)
# define IUTEST_HAS_CXX_HDR_FILESYSTEM 1
# endif
#endif
#if !defined(IUTEST_HAS_CXX_HDR_OPTIONAL)
# if __has_include(<optional>)
# define IUTEST_HAS_CXX_HDR_OPTIONAL 1
# endif
#endif
#if !defined(IUTEST_HAS_CXX_HDR_STRING_VIEW)
# if __has_include(<string_view>)
# define IUTEST_HAS_CXX_HDR_STRING_VIEW 1
# endif
#endif
#endif
#endif
#if IUTEST_HAS_CXX17
// c++17 feature
#if !defined(IUTEST_HAS_CXX_HDR_VARIANT)
# if IUTEST_HAS_VARIADIC_TEMPLATES && defined(__has_include)
# if defined(__clang__) && (IUTEST_CLANG_MAJOR < 3 || (IUTEST_CLANG_MAJOR == 3 && IUTEST_CLANG_MINOR < 6))
# define IUTEST_HAS_CXX_HDR_VARIANT 0 // clang 3.5 + variant is not worked
# elif __has_include(<variant>)
# define IUTEST_HAS_CXX_HDR_VARIANT 1
# endif
# endif
#endif
#if defined(IUTEST_HAS_CXX_HDR_CODECVT) && IUTEST_HAS_CXX_HDR_CODECVT
// IUTEST_PRAGMA_MESSAGE("iutest use codecvt, but codecvt was deprecated. If you do not want to use this, define IUTEST_HAS_CXX_HDR_CODECVT 0")
#endif
#endif
#if defined(__has_include)
# if defined(IUTEST_HAS_CXX_HDR_CODECVT) && IUTEST_HAS_CXX_HDR_CODECVT
# if !__has_include( <codecvt> )
# undef IUTEST_HAS_CXX_HDR_CODECVT
# endif
# endif
#endif
#if !defined(IUTEST_HAS_HDR_UNISTD)
# if defined(__has_include)
# if __has_include(<unistd.h>)
# define IUTEST_HAS_HDR_UNISTD 1
# endif
# endif
#endif
#if !defined(IUTEST_HAS_HDR_UNISTD)
# if defined(IUTEST_OS_LINUX) || defined(IUTEST_OS_CYGWIN) \
|| defined(IUTEST_OS_MAC) || defined(IUTEST_OS_IOS) \
|| defined(IUTEST_OS_FREEBSD) \
|| defined(__arm__)
# define IUTEST_HAS_HDR_UNISTD 1
# endif
#endif
// defaults for include
//! has any header
#if !defined(IUTEST_HAS_CXX_HDR_ANY)
# define IUTEST_HAS_CXX_HDR_ANY 0
#endif
//! has array header
#if !defined(IUTEST_HAS_CXX_HDR_ARRAY)
# define IUTEST_HAS_CXX_HDR_ARRAY 0
#endif
//! has charconv header
#if !defined(IUTEST_HAS_CXX_HDR_CHARCONV)
# define IUTEST_HAS_CXX_HDR_CHARCONV 0
#endif
//! has chrono header
#if !defined(IUTEST_HAS_CXX_HDR_CHRONO)
# define IUTEST_HAS_CXX_HDR_CHRONO 0
#endif
/**
* @brief has codecvt header
* @note P0618R0 Deprecating <codecvt>: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0618r0.html
* @deprecated
*/
#if !defined(IUTEST_HAS_CXX_HDR_CODECVT)
# define IUTEST_HAS_CXX_HDR_CODECVT 0
#endif
//! has cstdint header
#if !defined(IUTEST_HAS_CXX_HDR_CSTDINT)
# define IUTEST_HAS_CXX_HDR_CSTDINT 0
#endif
//! has cuchar
#if !defined(IUTEST_HAS_CXX_HDR_CUCHAR)
# define IUTEST_HAS_CXX_HDR_CUCHAR 0
#endif
//! has filesystem
#if !defined(IUTEST_HAS_CXX_HDR_FILESYSTEM)
# define IUTEST_HAS_CXX_HDR_FILESYSTEM 0
#endif
//! has optional header
#if !defined(IUTEST_HAS_CXX_HDR_OPTIONAL)
# define IUTEST_HAS_CXX_HDR_OPTIONAL 0
#endif
//! has random header
#if !defined(IUTEST_HAS_CXX_HDR_RANDOM)
# define IUTEST_HAS_CXX_HDR_RANDOM 0
#endif
//! has regex header
#if !defined(IUTEST_HAS_CXX_HDR_REGEX)
# define IUTEST_HAS_CXX_HDR_REGEX 0
#endif
//! has string_view header
#if !defined(IUTEST_HAS_CXX_HDR_STRING_VIEW)
# define IUTEST_HAS_CXX_HDR_STRING_VIEW 0
#endif
//! has variant header
#if !defined(IUTEST_HAS_CXX_HDR_VARIANT)
# define IUTEST_HAS_CXX_HDR_VARIANT 0
#endif
//! has cxxabi header
#if !defined(IUTEST_HAS_HDR_CXXABI)
# define IUTEST_HAS_HDR_CXXABI 0
#endif
//! has unistd.h header
#if !defined(IUTEST_HAS_HDR_UNISTD)
# define IUTEST_HAS_HDR_UNISTD 0
#endif
#if !defined(IUTEST_HAS_STD_FILESYSTEM)
# if defined(ANDROID) || defined(__ANDROID__) || defined(__ARM_EABI__)
# define IUTEST_HAS_STD_FILESYSTEM 0
# elif defined(__INTEL_COMPILER)
# define IUTEST_HAS_STD_FILESYSTEM 0
# elif IUTEST_HAS_CXX_HDR_FILESYSTEM && defined(__cpp_lib_filesystem) && __cpp_lib_filesystem >= 201703
# if !defined(__cpp_lib_experimental_filesystem)
# define IUTEST_HAS_STD_FILESYSTEM 1
# endif
# endif
#endif
#if !defined(IUTEST_HAS_STD_TO_CHARS)
# if IUTEST_HAS_CXX_HDR_CHARCONV && defined(__cpp_lib_to_chars) && __cpp_lib_to_chars >= 201611
# define IUTEST_HAS_STD_TO_CHARS 1
# endif
#endif
// defaults for feature
//! has ::std::begin,::std::end
#if !defined(IUTEST_HAS_STD_BEGIN_END)
# define IUTEST_HAS_STD_BEGIN_END 0
#endif
//! has ::std::declval
#if !defined(IUTEST_HAS_STD_DECLVAL)
# define IUTEST_HAS_STD_DECLVAL 0
#endif
//! has emplace
#if !defined(IUTEST_HAS_STD_EMPLACE)
# define IUTEST_HAS_STD_EMPLACE 0
#endif
//! has filesystem
#if !defined(IUTEST_HAS_STD_FILESYSTEM)
# define IUTEST_HAS_STD_FILESYSTEM 0
#endif
//! has std::invoke
#if !defined(IUTEST_HAS_STD_INVOKE)
# define IUTEST_HAS_STD_INVOKE 0
#endif
//! has quick_exit
#if !defined(IUTEST_HAS_STD_QUICK_EXIT)
# define IUTEST_HAS_STD_QUICK_EXIT 0
#endif
//! has to_chars
#if !defined(IUTEST_HAS_STD_TO_CHARS)
# define IUTEST_HAS_STD_TO_CHARS 0
#endif
//! use external include tr1::tuple
#if !defined(IUTEST_USE_EXTERNAL_TR1_TUPLE)
# define IUTEST_USE_EXTERNAL_TR1_TUPLE 0
#endif
//! use external include ::std::tuple
#ifndef IUTEST_USE_EXTERNAL_STD_TUPLE
# define IUTEST_USE_EXTERNAL_STD_TUPLE 0
#endif
//! has ::std::tuple
#if !defined(IUTEST_HAS_STD_TUPLE)
# define IUTEST_HAS_STD_TUPLE 0
#endif
//! has ::std::tr1::tuple
#if !defined(IUTEST_HAS_TR1_TUPLE)
# define IUTEST_HAS_TR1_TUPLE 0
#endif
//! has tuple
#if IUTEST_HAS_STD_TUPLE || IUTEST_HAS_TR1_TUPLE || IUTEST_USE_EXTERNAL_TR1_TUPLE || IUTEST_USE_EXTERNAL_STD_TUPLE
# if !defined(IUTEST_HAS_TUPLE)
# define IUTEST_HAS_TUPLE 1
# endif
#else
# if defined(IUTEST_HAS_TUPLE)
# undef IUTEST_HAS_TUPLE
# endif
# define IUTEST_HAS_TUPLE 0
#endif
#if !defined(IUTEST_HAS_VARIADIC_TUPLES) && IUTEST_HAS_VARIADIC_TEMPLATES && IUTEST_HAS_TUPLE && IUTEST_HAS_STD_TUPLE
# if defined(__clang__)
# if (IUTEST_CLANG_MAJOR > 3 || (IUTEST_CLANG_MAJOR == 3 && IUTEST_CLANG_MINOR > 7))
# define IUTEST_HAS_VARIADIC_TUPLES 1
# endif
# else
# define IUTEST_HAS_VARIADIC_TUPLES 1
# endif
#endif
#if !defined(IUTEST_HAS_VARIADIC_TUPLES)
# define IUTEST_HAS_VARIADIC_TUPLES 0
#endif
//! ::std::sto* が使用可能かどうか
#if !defined(IUTEST_HAS_STD_STR_TO_VALUE)
# if IUTEST_HAS_CXX11
# if defined(IUTEST_OS_WINDOWS_MINGW)
# if defined(__MINGW64__) && (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))
# define IUTEST_HAS_STD_STR_TO_VALUE 1
# endif
# else
# define IUTEST_HAS_STD_STR_TO_VALUE 1
# endif
# endif
#endif
#if !defined(IUTEST_HAS_STD_STR_TO_VALUE)
# define IUTEST_HAS_STD_STR_TO_VALUE 0
#endif
//! has sys/time.h header
#if !defined(IUTEST_HAS_HDR_SYSTIME)
# if defined(IUTEST_OS_WINDOWS) && !defined(IUTEST_OS_WINDOWS_MINGW) && !defined(IUTEST_OS_WINDOWS_WINE)
# define IUTEST_HAS_HDR_SYSTIME 0
# endif
#endif
#if !defined(IUTEST_HAS_HDR_SYSTIME)
# define IUTEST_HAS_HDR_SYSTIME 1
#endif
// socklen_t
#if defined(IUTEST_OS_WINDOWS_WINE)
# define __socklen_t_defined
#endif
//! ::std::stringstream が使用可能かどうか
#if !defined(IUTEST_HAS_STRINGSTREAM)
# if !defined(_STLP_NO_IOSTREAMS)
# define IUTEST_HAS_STRINGSTREAM 1
# endif
#endif
#if !defined(IUTEST_HAS_STRINGSTREAM)
# define IUTEST_HAS_STRINGSTREAM 0
#endif
/**
* @brief ::std::strstream が使用可能かどうか
* @note IUTEST_HAS_STRINGSTREAM が優先されます
* @deprecated
*/
#if !defined(IUTEST_HAS_STRSTREAM)
# define IUTEST_HAS_STRSTREAM 0
#endif
//! iomanip が使用可能かどうか
#if !defined(IUTEST_HAS_IOMANIP)
# if IUTEST_HAS_STRINGSTREAM || IUTEST_HAS_STRSTREAM
# define IUTEST_HAS_IOMANIP 1
# endif
#endif
#if !defined(IUTEST_HAS_IOMANIP)
# define IUTEST_HAS_IOMANIP 0
#endif
//! _set_invalid_parameter_handler が使用可能かどうか
#if !defined(IUTEST_HAS_INVALID_PARAMETER_HANDLER)
# if IUTEST_HAS_EXCEPTIONS && (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(IUTEST_OS_WINDOWS_MOBILE)
# define IUTEST_HAS_INVALID_PARAMETER_HANDLER 1
# endif
#endif
#if !defined(IUTEST_HAS_INVALID_PARAMETER_HANDLER)
# define IUTEST_HAS_INVALID_PARAMETER_HANDLER 0
#endif
//! has largefile api
#if !defined(IUTEST_HAS_LARGEFILE_API)
# if defined(__LARGEFILE_VISIBLE) && __LARGEFILE_VISIBLE
# define IUTEST_HAS_LARGEFILE_API 1
# elif defined(__POSIX_VISIBLE) && __POSIX_VISIBLE >= 200112
# define IUTEST_HAS_LARGEFILE_API 1
# else
# define IUTEST_HAS_LARGEFILE_API 0
# endif
#endif
//! has fopen
#if !defined(IUTEST_HAS_FOPEN)
# define IUTEST_HAS_FOPEN 1
#endif
//! has file stat
#if !defined(IUTEST_HAS_FILE_STAT)
# if !defined(IUTEST_OS_WINDOWS_MOBILE)
# define IUTEST_HAS_FILE_STAT 1
# endif
#endif
#if !defined(IUTEST_HAS_FILE_STAT)
# define IUTEST_HAS_FILE_STAT 0
#endif
//! has fileno
#if !defined(IUTEST_HAS_FILENO)
# if defined(__POSIX_VISIBLE) && __POSIX_VISIBLE == 0
# define IUTEST_HAS_FILENO 0
# elif defined(IUTEST_OS_WINDOWS_MINGW) && defined(__STRICT_ANSI__)
# define IUTEST_HAS_FILENO 0
# elif !defined(IUTEST_OS_WINDOWS_MOBILE)
# define IUTEST_HAS_FILENO 1
# endif
#endif
#if !defined(IUTEST_HAS_FILENO)
# define IUTEST_HAS_FILENO 0
#endif
//! has fd dup/dup2
#if !defined(IUTEST_HAS_FD_DUP)
# if IUTEST_HAS_HDR_UNISTD && !defined(__arm__)
# define IUTEST_HAS_FD_DUP 1
# endif
#endif
#if !defined(IUTEST_HAS_FD_DUP)
# define IUTEST_HAS_FD_DUP 0
#endif
//! has fdopen
#if !defined(IUTEST_HAS_FD_OPEN)
# if IUTEST_HAS_HDR_UNISTD
# if defined(__arm__)
# define IUTEST_HAS_FD_OPEN 0
# elif defined(IUTEST_OS_CYGWIN)
# if !defined(__STRICT_ANSI__)
# define IUTEST_HAS_FD_OPEN 1
# endif
# elif defined(IUTEST_OS_WINDOWS_MINGW) && !defined(__MINGW64__)
# define IUTEST_HAS_FD_OPEN 0
# else
# define IUTEST_HAS_FD_OPEN 1
# endif
# endif
#endif
#if !defined(IUTEST_HAS_FD_OPEN)
# define IUTEST_HAS_FD_OPEN 0
#endif
//! has mkstemp
#if !defined(IUTEST_HAS_MKSTEMP)
# if defined(HAVE_MKSTEMP)
# define IUTEST_HAS_MKSTEMP HAVE_MKSTEMP
# elif defined(__arm__)
# if !defined(_REENT_ONLY) \
&& ( (defined(__MISC_VISIBLE) && __MISC_VISIBLE) \
|| (defined(__POSIX_VISIBLE) && __POSIX_VISIBLE >= 200112) \
|| (defined(__XSI_VISIBLE) && __XSI_VISIBLE >= 4) \
)
# define IUTEST_HAS_MKSTEMP 1
# endif
# elif defined(IUTEST_OS_CYGWIN)
# if !defined(__STRICT_ANSI__)
# define IUTEST_HAS_MKSTEMP 1
# endif
# elif defined(IUTEST_OS_WINDOWS_MINGW) && !defined(__MINGW64__)
# define IUTEST_HAS_MKSTEMP 0
# elif IUTEST_HAS_HDR_UNISTD
# define IUTEST_HAS_MKSTEMP 1
# endif
#endif
#if !defined(IUTEST_HAS_MKSTEMP)
# define IUTEST_HAS_MKSTEMP 0
#endif
//! size_t format macros
#if !defined(IUPRzu)
# if defined(_MSC_VER) && (_MSC_VER < 1900)
# define IUPRzu "Iu"
# elif defined(IUTEST_OS_WINDOWS_MINGW)
# if !defined(__STRICT_ANSI__)
# if defined(__MINGW64__)
# define IUPRzu PRIu64
# elif defined(__MINGW32__)
# define IUPRzu PRIu32
# endif
# endif
# endif
#endif
#if !defined(IUPRzu)
# define IUPRzu "zu"
#endif
#if !defined(iu_va_copy)
# if defined(va_copy)
# define iu_va_copy va_copy
# elif defined(__GNUC__) || defined(__clang__)
# define iu_va_copy(dest, src) __builtin_va_copy(dest, src)
# else
# define iu_va_copy(dest, src) (dest = src)
# endif
#endif
//======================================================================
// include
// IWYU pragma: begin_exports
#include <iterator>
#if IUTEST_HAS_CXX_HDR_ANY
# include <any>
#endif
#if IUTEST_HAS_CXX_HDR_CSTDINT
# include <cstdint>
#endif
#if IUTEST_HAS_CXX_HDR_FILESYSTEM && IUTEST_HAS_STD_FILESYSTEM
# include <filesystem>
#endif
#if IUTEST_HAS_CXX_HDR_OPTIONAL
# include <optional>
#endif
#if IUTEST_HAS_CXX_HDR_VARIANT
# include <variant>
#endif
#if IUTEST_HAS_CXX_HDR_CHARCONV
# include <charconv>
#endif
// IWYU pragma: end_exports
#endif // INCG_IRIS_IUTEST_STDLIB_DEFS_HPP_9C62C097_E5FB_49EE_9329_811F32C846A2_
|