[詳解]
15 #ifndef INCG_IRIS_IUTEST_COMPILER_HPP_6DDB27E8_E2FF_4754_80B0_F500025820C4_
16 #define INCG_IRIS_IUTEST_COMPILER_HPP_6DDB27E8_E2FF_4754_80B0_F500025820C4_
24 #if defined(_MSC_VER) && _MSC_VER == 1700
25 # ifndef _VARIADIC_MAX
26 # define _VARIADIC_MAX 10
31 #define IUTEST_CPLUSPLUS_CXX11 201103L
32 #define IUTEST_CPLUSPLUS_CXX14 201402L
33 #define IUTEST_CPLUSPLUS_CXX17 201703L
36 #if defined(_MSVC_LANG)
37 # define IUTEST_CPLUSPLUS _MSVC_LANG
38 #elif defined(__cplusplus)
39 # define IUTEST_CPLUSPLUS __cplusplus
41 # define IUTEST_CPLUSPLUS 0
46 #if !defined(IUTEST_HAS_CXX2A)
47 # if IUTEST_CPLUSPLUS > IUTEST_CPLUSPLUS_CXX17
48 # define IUTEST_HAS_CXX2A 1
52 #if !defined(IUTEST_HAS_CXX2A)
53 # define IUTEST_HAS_CXX2A 0
58 #if !defined(IUTEST_HAS_CXX17)
59 # if IUTEST_CPLUSPLUS >= IUTEST_CPLUSPLUS_CXX17
60 # define IUTEST_HAS_CXX17 1
64 #if !defined(IUTEST_HAS_CXX17)
65 # define IUTEST_HAS_CXX17 0
68 #if !defined(IUTEST_HAS_CXX1Z)
69 # if IUTEST_CPLUSPLUS > IUTEST_CPLUSPLUS_CXX14
70 # define IUTEST_HAS_CXX1Z 1
74 #if !defined(IUTEST_HAS_CXX1Z)
75 # define IUTEST_HAS_CXX1Z 0
79 #if !defined(IUTEST_HAS_CXX14)
80 # if IUTEST_CPLUSPLUS >= IUTEST_CPLUSPLUS_CXX14
81 # define IUTEST_HAS_CXX14 1
85 #if !defined(IUTEST_HAS_CXX14)
86 # define IUTEST_HAS_CXX14 0
90 #if !defined(IUTEST_HAS_CXX11)
91 # if (IUTEST_CPLUSPLUS >= IUTEST_CPLUSPLUS_CXX11) || defined(__GXX_EXPERIMENTAL_CXX0X__)
92 # define IUTEST_HAS_CXX11 1
96 #if !defined(IUTEST_HAS_CXX11)
97 # define IUTEST_HAS_CXX11 0
102 #if !defined(IUTEST_HAS_CONCEPTS)
103 # if defined(__cpp_concepts) && __cpp_concepts >= 201907
104 # define IUTEST_HAS_CONCEPTS 1
105 # elif IUTEST_HAS_CXX2A && defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 192328105
106 # define IUTEST_HAS_CONCEPTS 1
110 #if !defined(IUTEST_HAS_CONCEPTS)
111 # define IUTEST_HAS_CONCEPTS 0
117 #if !defined(IUTEST_HAS_INLINE_VARIABLE)
118 #if defined(__cpp_inline_variables) && __cpp_inline_variables >= 201606
119 # define IUTEST_HAS_INLINE_VARIABLE 1
120 #elif defined(__clang__)
121 # if IUTEST_HAS_CXX1Z && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 9))
122 # define IUTEST_HAS_INLINE_VARIABLE 1
127 #if !defined(IUTEST_HAS_INLINE_VARIABLE)
128 # define IUTEST_HAS_INLINE_VARIABLE 0
132 #if !defined(IUTEST_HAS_CONSTEXPR_IF)
133 # if defined(__cpp_if_constexpr) && __cpp_if_constexpr >= 201606
134 # define IUTEST_HAS_CONSTEXPR_IF 1
135 # elif defined(_MSC_VER)
136 # if _MSC_VER >= 1910 && IUTEST_HAS_CXX17
137 # define IUTEST_HAS_CONSTEXPR_IF 1
142 #if !defined(IUTEST_HAS_CONSTEXPR_IF)
143 # define IUTEST_HAS_CONSTEXPR_IF 0
149 #if !defined(IUTEST_HAS_NULLPTR)
150 # if defined(_NATIVE_NULLPTR_SUPPORTED)
151 # define IUTEST_HAS_NULLPTR 1
152 # elif defined(__clang__)
153 # if __has_feature(cxx_nullptr)
154 # define IUTEST_HAS_NULLPTR 1
156 # if (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ <= 2))
157 # define IUTEST_NO_NULL_TO_NULLPTR_T 1 // -Wnull-conversion
159 # elif defined(__GNUC__)
160 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
161 # define IUTEST_HAS_NULLPTR 1
163 # elif defined(_MSC_VER)
165 # define IUTEST_HAS_NULLPTR 1
167 # elif defined(__INTEL_COMPILER)
168 # if __INTEL_COMPILER > 1200
169 # define IUTEST_HAS_NULLPTR 1
174 #if !defined(IUTEST_HAS_NULLPTR)
175 # define IUTEST_HAS_NULLPTR 0
178 #if !defined(IUTEST_NULLPTR)
179 # if IUTEST_HAS_NULLPTR
180 # define IUTEST_NULLPTR nullptr
182 # define IUTEST_NULLPTR NULL
187 #if !defined(IUTEST_HAS_AUTO)
188 # if defined(__clang__)
189 # if __has_feature(cxx_auto_type)
190 # define IUTEST_HAS_AUTO 1
192 # elif defined(__GNUC__)
193 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
194 # define IUTEST_HAS_AUTO 1
196 # elif defined(_MSC_VER)
197 # if _MSC_VER >= 1600
198 # define IUTEST_HAS_AUTO 1
200 # elif defined(__INTEL_COMPILER)
201 # if __INTEL_COMPILER >= 1200
202 # define IUTEST_HAS_AUTO 1
207 #if !defined(IUTEST_HAS_AUTO)
208 # define IUTEST_HAS_AUTO 0
212 #if !defined(IUTEST_HAS_DECLTYPE)
213 # if defined(__cpp_decltype) && __cpp_decltype >= 200707
214 # define IUTEST_HAS_DECLTYPE 1
215 # elif defined(__clang__)
216 # if __has_feature(cxx_decltype)
217 # define IUTEST_HAS_DECLTYPE 1
219 # elif defined(__GNUC__)
220 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
221 # define IUTEST_HAS_DECLTYPE 1
223 # elif defined(_MSC_VER)
224 # if _MSC_VER >= 1600
225 # define IUTEST_HAS_DECLTYPE 1
227 # elif defined(__INTEL_COMPILER)
228 # if __INTEL_COMPILER >= 1200
229 # define IUTEST_HAS_DECLTYPE 1
234 #if !defined(IUTEST_HAS_DECLTYPE)
235 # define IUTEST_HAS_DECLTYPE 0
239 #if !defined(IUTEST_HAS_STATIC_ASSERT)
240 # if defined(__cpp_static_assert) && __cpp_static_assert >= 200410
241 # define IUTEST_HAS_STATIC_ASSERT 1
242 # elif defined(__clang__)
243 # if __has_feature(cxx_static_assert)
244 # define IUTEST_HAS_STATIC_ASSERT 1
246 # elif defined(__GNUC__)
247 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
248 # define IUTEST_HAS_STATIC_ASSERT 1
250 # elif defined(_MSC_VER)
251 # if _MSC_VER >= 1600
252 # define IUTEST_HAS_STATIC_ASSERT 1
254 # elif defined(__INTEL_COMPILER)
255 # if __INTEL_COMPILER > 1100
256 # define IUTEST_HAS_STATIC_ASSERT 1
261 #if !defined(IUTEST_HAS_STATIC_ASSERT)
262 # define IUTEST_HAS_STATIC_ASSERT 0
267 #if !defined(IUTEST_HAS_CONSTEXPR)
268 # if defined(__cpp_constexpr) && __cpp_constexpr >= 200704
269 # define IUTEST_HAS_CONSTEXPR 1
270 # elif defined(__clang__)
271 # if __has_feature(cxx_constexpr)
272 # define IUTEST_HAS_CONSTEXPR 1
274 # elif defined(__GNUC__)
275 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
276 # define IUTEST_HAS_CONSTEXPR 1
278 # elif defined(_MSC_VER)
279 # if _MSC_VER >= 1900 || _MSC_FULL_VER == 180021114
280 # define IUTEST_HAS_CONSTEXPR 1
282 # elif defined(__INTEL_COMPILER)
283 # if __INTEL_COMPILER >= 1400
284 # define IUTEST_HAS_CONSTEXPR 1
289 #if !defined(IUTEST_HAS_CONSTEXPR)
290 # define IUTEST_HAS_CONSTEXPR 0
294 #if IUTEST_HAS_CONSTEXPR
295 # define IUTEST_CXX_CONSTEXPR constexpr
297 # define IUTEST_CXX_CONSTEXPR
300 #if IUTEST_HAS_CONSTEXPR && \
301 (defined(__cpp_constexpr) && __cpp_constexpr >= 201304 || IUTEST_HAS_CXX14)
302 # define IUTEST_CXX14_CONSTEXPR constexpr
304 # define IUTEST_CXX14_CONSTEXPR
308 #if IUTEST_HAS_CONSTEXPR
309 # define IUTEST_CXX_CONSTEXPR_OR_CONST constexpr
311 # define IUTEST_CXX_CONSTEXPR_OR_CONST const
315 #if !defined(IUTEST_HAS_RVALUE_REFS)
316 # if defined(__cpp_rvalue_references) && __cpp_rvalue_references >= 200610
317 # define IUTEST_HAS_RVALUE_REFS 1
318 # elif defined(__clang__)
319 # if __has_feature(cxx_rvalue_references)
320 # define IUTEST_HAS_RVALUE_REFS 1
322 # elif defined(__GNUC__)
323 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
324 # define IUTEST_HAS_RVALUE_REFS 1
326 # elif defined(_MSC_VER)
327 # if (_MSC_VER >= 1700)
328 # define IUTEST_HAS_RVALUE_REFS 1
330 # elif defined(__INTEL_COMPILER)
331 # if __INTEL_COMPILER >= 1200
332 # define IUTEST_HAS_RVALUE_REFS 1
337 #if !defined(IUTEST_HAS_RVALUE_REFS)
338 # define IUTEST_HAS_RVALUE_REFS 0
342 #ifndef IUTEST_HAS_DELETED_FUNCTIONS
343 # if defined(__clang__)
344 # if __has_feature(cxx_deleted_functions)
345 # define IUTEST_HAS_DELETED_FUNCTIONS 1
347 # elif defined(__GNUC__)
348 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
349 # define IUTEST_HAS_DELETED_FUNCTIONS 1
351 # elif defined(_MSC_VER)
352 # if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 180020827)
353 # define IUTEST_HAS_DELETED_FUNCTIONS 1
355 # elif defined(__INTEL_COMPILER)
356 # if __INTEL_COMPILER >= 1200
357 # define IUTEST_HAS_DELETED_FUNCTIONS 1
362 #if !defined(IUTEST_HAS_DELETED_FUNCTIONS)
363 # define IUTEST_HAS_DELETED_FUNCTIONS 0
367 #if IUTEST_HAS_DELETED_FUNCTIONS
368 # define IUTEST_CXX_DELETED_FUNCTION = delete
370 # define IUTEST_CXX_DELETED_FUNCTION
373 #if !defined(IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION) && !IUTEST_HAS_RVALUE_REFS
374 # define IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION 0
378 #if !defined(IUTEST_HAS_DEFAULT_FUNCTIONS)
379 # if defined(__clang__)
380 # if __has_feature(cxx_defaulted_functions)
381 # define IUTEST_HAS_DEFAULT_FUNCTIONS 1
383 # elif defined(__GNUC__)
386 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 4)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
387 # define IUTEST_HAS_DEFAULT_FUNCTIONS 1
388 # if !defined(IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION)
389 # define IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION 0
391 # elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
392 # define IUTEST_HAS_DEFAULT_FUNCTIONS 1
394 # elif defined(_MSC_VER)
395 # if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 180020827)
396 # define IUTEST_HAS_DEFAULT_FUNCTIONS 1
397 # if (_MSV_VER <= 1800) && !defined(IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION)
398 # define IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION 0
401 # elif defined(__INTEL_COMPILER)
402 # if __INTEL_COMPILER >= 1200
403 # define IUTEST_HAS_DEFAULT_FUNCTIONS 1
408 #if !defined(IUTEST_HAS_DEFAULT_FUNCTIONS)
409 # define IUTEST_HAS_DEFAULT_FUNCTIONS 0
411 #if !defined(IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION)
412 # define IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION IUTEST_HAS_DEFAULT_FUNCTIONS
416 #if IUTEST_HAS_DEFAULT_FUNCTIONS
417 # define IUTEST_CXX_DEFAULT_FUNCTION = default;
419 # define IUTEST_CXX_DEFAULT_FUNCTION {}
423 #if !defined(IUTEST_HAS_INITIALIZER_LIST)
424 # if defined(__cpp_initializer_lists) && __cpp_initializer_lists >= 200806
425 # define IUTEST_HAS_INITIALIZER_LIST 1
426 # elif defined(__clang__)
427 # if __has_feature(cxx_generalized_initializers)
428 # define IUTEST_HAS_INITIALIZER_LIST 1
430 # elif defined(__GNUC__)
431 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
432 # define IUTEST_HAS_INITIALIZER_LIST 1
434 # elif defined(_MSC_VER)
435 # if (_MSC_VER >= 1800)
436 # define IUTEST_HAS_INITIALIZER_LIST 1
437 # elif (_MSC_FULL_VER == 170051025)
438 # define IUTEST_HAS_INITIALIZER_LIST 1
439 # include <initializer_list>
441 # elif defined(__INTEL_COMPILER)
442 # if __INTEL_COMPILER >= 1400
443 # define IUTEST_HAS_INITIALIZER_LIST 1
448 #if !defined(IUTEST_HAS_INITIALIZER_LIST)
449 # define IUTEST_HAS_INITIALIZER_LIST 0
453 #if !defined(IUTEST_HAS_VARIADIC_TEMPLATES)
454 # if defined(__cpp_variadic_templates) && __cpp_variadic_templates >= 200704
455 # define IUTEST_HAS_VARIADIC_TEMPLATES 1
456 # elif defined(__clang__)
457 # if __has_feature(cxx_variadic_templates)
458 # define IUTEST_HAS_VARIADIC_TEMPLATES 1
460 # elif defined(__GNUC__)
462 # if defined(__VARIADIC_TEMPLATES) \
463 || ( ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))) && defined(__GXX_EXPERIMENTAL_CXX0X__) )
464 # define IUTEST_HAS_VARIADIC_TEMPLATES 1
466 # elif defined(_MSC_VER)
467 # if (_MSC_VER >= 1800)
468 # define IUTEST_HAS_VARIADIC_TEMPLATES 1
469 # elif (_MSC_FULL_VER == 170051025)
470 # define IUTEST_HAS_VARIADIC_TEMPLATES 1
471 # define IUTEST_HAS_VARIADIC_COMBINE 0
473 # elif defined(__INTEL_COMPILER)
474 # if __INTEL_COMPILER > 1200
475 # define IUTEST_HAS_VARIADIC_TEMPLATES 1
480 #if !defined(IUTEST_HAS_VARIADIC_TEMPLATES)
481 # define IUTEST_HAS_VARIADIC_TEMPLATES 0
485 #if !defined(IUTEST_HAS_VARIADIC_TEMPLATE_TEMPLATES)
486 # if defined(__clang__)
487 # if __has_feature(cxx_variadic_templates)
488 # define IUTEST_HAS_VARIADIC_TEMPLATE_TEMPLATES 1
490 # elif defined(__GNUC__)
491 # if defined(__VARIADIC_TEMPLATES) || ( ((__GNUC__ > 4) \
492 || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) \
493 || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7) && (__GNUC_PATCHLEVEL__ >= 1))) \
494 && defined(__GXX_EXPERIMENTAL_CXX0X__) )
495 # define IUTEST_HAS_VARIADIC_TEMPLATE_TEMPLATES 1
497 # elif defined(_MSC_VER)
498 # define IUTEST_HAS_VARIADIC_TEMPLATE_TEMPLATES IUTEST_HAS_VARIADIC_TEMPLATES
499 # elif defined(__INTEL_COMPILER)
500 # define IUTEST_HAS_VARIADIC_TEMPLATE_TEMPLATES IUTEST_HAS_VARIADIC_TEMPLATES
504 #ifndef IUTEST_HAS_VARIADIC_TEMPLATE_TEMPLATES
505 # define IUTEST_HAS_VARIADIC_TEMPLATE_TEMPLATES 0
509 #if !defined(IUTEST_HAS_CHAR16_T)
510 # if defined(__cpp_unicode_characters) && __cpp_unicode_characters >= 200704 && defined(__cpp_unicode_literals) && __cpp_unicode_literals >= 200710
511 # define IUTEST_HAS_CHAR16_T 1
512 # elif defined(__clang__)
513 # if __has_feature(cxx_unicode_literals)
514 # define IUTEST_HAS_CHAR16_T 1
516 # elif defined(__GNUC__)
517 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
518 # define IUTEST_HAS_CHAR16_T 1
520 # elif defined(_MSC_VER)
521 # if _MSC_VER >= 1900
522 # define IUTEST_HAS_CHAR16_T 1
524 # elif defined(__INTEL_COMPILER)
525 # if __INTEL_COMPILER >= 1400
526 # define IUTEST_HAS_CHAR16_T 1
531 #if !defined(IUTEST_HAS_CHAR16_T)
532 # define IUTEST_HAS_CHAR16_T 0
536 #ifndef IUTEST_HAS_CHAR32_T
537 # if defined(__cpp_unicode_characters) && __cpp_unicode_characters >= 200704 && defined(__cpp_unicode_literals) && __cpp_unicode_literals >= 200710
538 # define IUTEST_HAS_CHAR32_T 1
539 # elif defined(__clang__)
540 # if __has_feature(cxx_unicode_literals)
541 # define IUTEST_HAS_CHAR32_T 1
543 # elif defined(__GNUC__)
544 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
545 # define IUTEST_HAS_CHAR32_T 1
547 # elif defined(_MSC_VER)
548 # if _MSC_VER >= 1900
549 # define IUTEST_HAS_CHAR32_T 1
551 # elif defined(__INTEL_COMPILER)
552 # if __INTEL_COMPILER >= 1400
553 # define IUTEST_HAS_CHAR32_T 1
558 #if !defined(IUTEST_HAS_CHAR32_T)
559 # define IUTEST_HAS_CHAR32_T 0
563 #if !defined(IUTEST_HAS_LAMBDA)
564 # if defined(__cpp_lambdas) && __cpp_lambdas >= 200907
565 # define IUTEST_HAS_LAMBDA 1
566 # elif defined(__clang__)
567 # if __has_feature(cxx_lambdas)
568 # define IUTEST_HAS_LAMBDA 1
570 # elif defined(__GNUC__)
571 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
572 # define IUTEST_HAS_LAMBDA 1
574 # elif defined(_MSC_VER)
576 # define IUTEST_HAS_LAMBDA 1
577 # elif _MSC_VER > 1600
578 # define IUTEST_HAS_LAMBDA 1
579 # define IUTEST_NO_LAMBDA_SEH_SCOPE_RESOLUTION // lambda v1.1 is not supported try/__try scope resolution.
580 # elif _MSC_VER == 1600
581 # define IUTEST_HAS_LAMBDA 1
582 # define IUTEST_NO_LAMBDA_SCOPE_RESOLUTION // VC++10 lambda v1.0 is not supported.
584 # elif defined(__INTEL_COMPILER)
585 # if __INTEL_COMPILER >= 1200
586 # define IUTEST_HAS_LAMBDA 1
591 #if !defined(IUTEST_HAS_LAMBDA)
592 # define IUTEST_HAS_LAMBDA 0
595 #if IUTEST_HAS_LAMBDA
596 # if defined(__GNUC__)
597 # if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7))
598 # define IUTEST_NO_LAMBDA_LOCAL_OBJECT_TEMPLATE_PARAMETERS
600 # elif defined(_MSC_VER)
601 # define IUTEST_NO_LAMBDA_LOCAL_OBJECT_TEMPLATE_PARAMETERS
606 #if !defined(IUTEST_HAS_EXPLICIT_CONVERSION)
607 # if defined(__clang__)
608 # if __has_feature(cxx_explicit_conversions)
609 # define IUTEST_HAS_EXPLICIT_CONVERSION 1
611 # elif defined(__GNUC__)
612 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
613 # define IUTEST_HAS_EXPLICIT_CONVERSION 1
615 # elif defined(_MSC_VER)
616 # if (_MSC_VER >= 1800) || (_MSC_FULL_VER == 170051025)
617 # define IUTEST_HAS_EXPLICIT_CONVERSION 1
619 # elif defined(__INTEL_COMPILER)
620 # if __INTEL_COMPILER >= 1300
621 # define IUTEST_HAS_EXPLICIT_CONVERSION 1
626 #if !defined(IUTEST_HAS_EXPLICIT_CONVERSION)
627 # define IUTEST_HAS_EXPLICIT_CONVERSION 0
631 #if !defined(IUTEST_CXX_EXPLICIT_CONVERSION)
632 # if IUTEST_HAS_EXPLICIT_CONVERSION
633 # define IUTEST_CXX_EXPLICIT_CONVERSION explicit
635 # define IUTEST_CXX_EXPLICIT_CONVERSION
640 #if !defined(IUTEST_HAS_OVERRIDE_AND_FINAL)
641 # if defined(__clang__)
642 # if __has_feature(cxx_override_control)
643 # define IUTEST_HAS_OVERRIDE_AND_FINAL 1
645 # elif defined(__GNUC__)
646 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
647 # define IUTEST_HAS_OVERRIDE_AND_FINAL 1
649 # elif defined(_MSC_VER)
650 # if _MSC_VER >= 1700
651 # define IUTEST_HAS_OVERRIDE_AND_FINAL 1
653 # elif defined(__INTEL_COMPILER)
654 # if __INTEL_COMPILER >= 1400
655 # define IUTEST_HAS_OVERRIDE_AND_FINAL 1
660 #if !defined(IUTEST_HAS_OVERRIDE_AND_FINAL)
661 # define IUTEST_HAS_OVERRIDE_AND_FINAL 0
665 #if !defined(IUTEST_CXX_OVERRIDE)
666 # if IUTEST_HAS_OVERRIDE_AND_FINAL
667 # define IUTEST_CXX_OVERRIDE override
669 # define IUTEST_CXX_OVERRIDE
674 #if !defined(IUTEST_CXX_FINAL)
675 # if IUTEST_HAS_OVERRIDE_AND_FINAL
676 # define IUTEST_CXX_FINAL final
678 # define IUTEST_CXX_FINAL
683 #ifndef IUTEST_HAS_NOEXCEPT
684 # if defined(__clang__)
685 # if __has_feature(cxx_noexcept)
686 # define IUTEST_HAS_NOEXCEPT 1
688 # elif defined(__GNUC__)
689 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
690 # define IUTEST_HAS_NOEXCEPT 1
692 # elif defined(_MSC_VER)
694 # if _MSC_FULL_VER >= 190022816
695 # define IUTEST_HAS_NOEXCEPT 1
697 # elif defined(__INTEL_COMPILER)
698 # if __INTEL_COMPILER >= 1400
699 # define IUTEST_HAS_NOEXCEPT 1
704 #if !defined(IUTEST_HAS_NOEXCEPT)
705 # define IUTEST_HAS_NOEXCEPT 0
709 #if !defined(IUTEST_HAS_NOEXCEPT_FUNCTION_TYPE)
710 # if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510L
711 # define IUTEST_HAS_NOEXCEPT_FUNCTION_TYPE 1
715 #if !defined(IUTEST_HAS_NOEXCEPT_FUNCTION_TYPE)
716 # define IUTEST_HAS_NOEXCEPT_FUNCTION_TYPE 0
720 #if !defined(IUTEST_CXX_NOEXCEPT)
721 # if IUTEST_HAS_NOEXCEPT
722 # define IUTEST_CXX_NOEXCEPT(expr_) noexcept(expr_)
724 # define IUTEST_CXX_NOEXCEPT(expr_)
729 #if !defined(IUTEST_CXX_NOEXCEPT_SPEC)
730 # if IUTEST_HAS_NOEXCEPT
731 # define IUTEST_CXX_NOEXCEPT_SPEC noexcept
733 # define IUTEST_CXX_NOEXCEPT_SPEC
737 #if !defined(IUTEST_CXX_NOEXCEPT_AS)
738 # if IUTEST_HAS_NOEXCEPT
739 # define IUTEST_CXX_NOEXCEPT_AS(expr_) noexcept( noexcept(expr_) )
741 # define IUTEST_CXX_NOEXCEPT_AS(expr_)
746 #if !defined(IUTEST_CXX_NOTHROW)
747 # if IUTEST_HAS_NOEXCEPT
748 # define IUTEST_CXX_NOTHROW noexcept
749 # elif IUTEST_HAS_CXX2A
750 # define IUTEST_CXX_NOTHROW
752 # define IUTEST_CXX_NOTHROW throw() // C++20 で消える
757 #if !defined(IUTEST_HAS_EXTERN_TEMPLATE)
758 # if defined(_MSC_VER) && _MSC_VER >= 1400
759 # define IUTEST_HAS_EXTERN_TEMPLATE 1
760 # elif defined(__GNUC__) || defined(__clang__)
761 # define IUTEST_HAS_EXTERN_TEMPLATE 1
762 # elif defined(__INTEL_COMPILER)
763 # if __INTEL_COMPILER > 1100
764 # define IUTEST_HAS_EXTERN_TEMPLATE 1
769 #if !defined(IUTEST_HAS_EXTERN_TEMPLATE)
770 # define IUTEST_HAS_EXTERN_TEMPLATE 0
774 #if !defined(IUTEST_HAS_STRONG_ENUMS)
775 # if defined(__clang__)
776 # if __has_feature(cxx_strong_enums)
777 # define IUTEST_HAS_STRONG_ENUMS 1
779 # elif defined(__GNUC__)
780 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
781 # define IUTEST_HAS_STRONG_ENUMS 1
783 # elif defined(_MSC_VER)
784 # if _MSC_VER >= 1700
785 # define IUTEST_HAS_STRONG_ENUMS 1
787 # elif defined(__INTEL_COMPILER)
788 # if __INTEL_COMPILER >= 1400
789 # define IUTEST_HAS_STRONG_ENUMS 1
794 #if !defined(IUTEST_HAS_STRONG_ENUMS)
795 # define IUTEST_HAS_STRONG_ENUMS 0
800 #if !defined(IUTEST_HAS_EXCEPTIONS)
801 # if defined(_MSC_VER) || defined(__BORLANDC__)
802 # ifndef _HAS_EXCEPTIONS
803 # define _HAS_EXCEPTIONS 1
805 # define IUTEST_HAS_EXCEPTIONS _HAS_EXCEPTIONS
806 # elif defined(__clang__)
807 # if __EXCEPTIONS && __has_feature(cxx_exceptions)
808 # define IUTEST_HAS_EXCEPTIONS 1
810 # elif defined(__GNUC__)
811 # if defined(__EXCEPTIONS)
812 # define IUTEST_HAS_EXCEPTIONS 1
814 # elif defined(__MWERKS__)
815 # if __option(exceptions)
816 # define IUTEST_HAS_EXCEPTIONS 1
821 #if !defined(IUTEST_HAS_EXCEPTIONS)
822 # define IUTEST_HAS_EXCEPTIONS 0
826 #if !defined(IUTEST_HAS_SEH)
827 # if defined(_WIN32) && !defined(__clang__)
828 # if defined(_MSC_VER) && _MSC_VER > 1400
829 # define IUTEST_HAS_SEH 1
831 # elif defined(__BORLANDC__)
832 # define IUTEST_HAS_SEH 1
836 #if !defined(IUTEST_HAS_SEH)
837 # define IUTEST_HAS_SEH 0
841 #if !defined(IUTEST_HAS_RTTI)
842 # if defined(__clang__)
843 # if __has_feature(cxx_rtti)
844 # define IUTEST_HAS_RTTI 1
846 # if defined(_MSC_VER) // clang for windows
847 # if !defined(_CPPRTTI)
848 # include <exception>
851 # elif defined(__GNUC__)
853 # define IUTEST_HAS_RTTI 1
856 # define IUTEST_HAS_RTTI 1
858 # elif defined(__MWERKS__)
860 # define IUTEST_HAS_RTTI 1
862 # elif defined(__ARMCC_VERSION)
864 # define IUTEST_HAS_RTTI 1
866 # elif defined(__IBMCPP__)
867 # if (__IBMCPP__ >= 900)
868 # define IUTEST_HAS_RTTI 1
870 # elif defined(_MSC_VER)
872 # define IUTEST_HAS_RTTI 1
877 #if !defined(IUTEST_HAS_RTTI)
878 # define IUTEST_HAS_RTTI 0
885 #if !defined(IUTEST_WCHAR_UNSIGNED)
886 # if defined(__WCHAR_UNSIGNED__) && __WCHAR_UNSIGNED__
887 # define IUTEST_WCHAR_UNSIGNED 1
888 # elif defined(_MSC_VER)
889 # if defined(_NATIVE_WCHAR_T_DEFINED)
890 # define IUTEST_WCHAR_UNSIGNED 1
895 #if !defined(IUTEST_WCHAR_UNSIGNED)
896 # define IUTEST_WCHAR_UNSIGNED 0
900 #if !defined(IUTEST_HAS_INT128)
901 # if defined(__SIZEOF_INT128__) && __SIZEOF_INT128__ == 16
902 # define IUTEST_HAS_INT128 1
903 # elif defined(_MSC_VER) && defined(_M_X64)
910 #if !defined(IUTEST_HAS_INT128)
911 # define IUTEST_HAS_INT128 0
915 #if !defined(IUTEST_EXPLICIT_INSTANTIATION_ACCESS_PRIVATE_MEMBER_FUNCTION)
916 # if defined(_MSC_VER) && ((_MSC_VER < 1600) || (_MSC_VER == 1900))
918 # define IUTEST_EXPLICIT_INSTANTIATION_ACCESS_PRIVATE_MEMBER_FUNCTION 0
920 # define IUTEST_EXPLICIT_INSTANTIATION_ACCESS_PRIVATE_MEMBER_FUNCTION 1
925 #if !defined(IUTEST_EXPLICIT_INSTANTIATION_ACCESS_PRIVATE_STATIC_MEMBER_FUNCTION)
926 # if defined(_MSC_VER) && (_MSC_VER < 1910)
928 # define IUTEST_EXPLICIT_INSTANTIATION_ACCESS_PRIVATE_STATIC_MEMBER_FUNCTION 0
930 # define IUTEST_EXPLICIT_INSTANTIATION_ACCESS_PRIVATE_STATIC_MEMBER_FUNCTION 1
935 #if !defined(IUTEST_NO_VARIADIC_MACROS)
936 # if defined(_MSC_VER) && (_MSC_VER < 1500)
937 # define IUTEST_NO_VARIADIC_MACROS 1
942 #if !defined(IUTEST_HAS_COUNTER_MACRO)
943 # if defined(_MSC_VER) && (_MSC_VER >= 1300)
944 # define IUTEST_HAS_COUNTER_MACRO 1
945 # elif defined(__clang__)
946 # define IUTEST_HAS_COUNTER_MACRO 1
947 # elif defined(__GNUC__)
948 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
949 # define IUTEST_HAS_COUNTER_MACRO 1
954 #if !defined(IUTEST_HAS_COUNTER_MACRO)
955 # define IUTEST_HAS_COUNTER_MACRO 0
959 #if !defined(IUTEST_HAS_FILE_STAT)
960 # if !defined(IUTEST_OS_WINDOWS_MOBILE)
961 # define IUTEST_HAS_FILE_STAT 1
966 #if !defined(IUTEST_HAS_FILENO)
967 # if !defined(IUTEST_OS_WINDOWS_MOBILE) && !defined(__STRICT_ANSI__)
968 # define IUTEST_HAS_FILENO 1
973 #if !defined(IUTEST_HAS_CLASS_MEMBER_TEMPLATE_SPECIALIZATION)
974 # if defined(_MSC_VER)
975 # define IUTEST_HAS_CLASS_MEMBER_TEMPLATE_SPECIALIZATION 1
977 # define IUTEST_HAS_CLASS_MEMBER_TEMPLATE_SPECIALIZATION 0
982 #if !defined(IUTEST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
983 # if defined(_MSC_VER) && (_MSC_VER < 1310)
984 # define IUTEST_NO_TEMPLATE_PARTIAL_SPECIALIZATION 1
989 #if !defined(IUTEST_NO_TWO_PHASE_NAME_LOOKUP)
992 # if defined(_MSC_VER) && (_MSC_VER < 1910)
993 # define IUTEST_NO_TWO_PHASE_NAME_LOOKUP 1
998 #if !defined(IUTEST_NO_FUNCTION_TEMPLATE_ORDERING)
999 # if defined(_MSC_VER) && (_MSC_VER < 1310)
1000 # define IUTEST_NO_FUNCTION_TEMPLATE_ORDERING 1
1005 #if !defined(IUTEST_NO_INCLASS_MEMBER_INITIALIZATION)
1006 # if defined(_MSC_VER) && _MSC_VER < 1310
1007 # define IUTEST_NO_INCLASS_MEMBER_INITIALIZATION 1
1012 #if !defined(IUTEST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS)
1013 # if defined(_MSC_VER) && _MSC_VER < 1310
1014 # define IUTEST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS 1
1019 #if !defined(IUTEST_NO_SFINAE)
1020 # if defined(_MSC_VER) && _MSC_VER < 1310
1021 # define IUTEST_NO_SFINAE 1
1026 #if !defined(IUTEST_NO_TEMPLATE_TEMPLATES)
1027 # if defined(_MSC_VER) && _MSC_VER < 1310
1028 # define IUTEST_NO_TEMPLATE_TEMPLATES 1
1033 #if !defined(IUTEST_NO_VOID_RETURNS)
1034 # if defined(_MSC_VER) && _MSC_VER < 1300
1035 # define IUTEST_NO_VOID_RETURNS 1
1040 #if !defined(IUTEST_NO_ARGUMENT_DEPENDENT_LOOKUP)
1041 # if defined(_MSC_VER) && _MSC_VER < 1310
1042 # define IUTEST_NO_ARGUMENT_DEPENDENT_LOOKUP 1
1046 #if !defined(IUTEST_NO_PRIVATE_IN_AGGREGATE)
1047 # if defined(_MSC_VER) && _MSC_VER < 1310
1048 # define IUTEST_NO_PRIVATE_IN_AGGREGATE 1
1053 #if !defined(IUTEST_HAS_WANT_SECURE_LIB)
1054 # if defined(_MSC_VER)
1055 # if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__
1056 # define IUTEST_HAS_WANT_SECURE_LIB 1
1061 #if !defined(IUTEST_HAS_WANT_SECURE_LIB)
1062 # define IUTEST_HAS_WANT_SECURE_LIB 0
1068 #if !defined(IUTEST_HAS_MS_EXTENSIONS)
1069 # if defined(__clang__)
1073 # elif defined(_MSC_VER)
1074 # define IUTEST_HAS_MS_EXTENSIONS 1
1078 #if !defined(IUTEST_HAS_MS_EXTENSIONS)
1079 # define IUTEST_HAS_MS_EXTENSIONS 0
1083 #if !defined(IUTEST_HAS_IF_EXISTS)
1084 # if defined(__clang__)
1085 # if IUTEST_HAS_MS_EXTENSIONS && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 5) )
1086 # define IUTEST_HAS_IF_EXISTS 1
1088 # elif defined(_MSC_VER) && _MSC_VER >= 1310
1089 # define IUTEST_HAS_IF_EXISTS 1
1093 #if !defined(IUTEST_HAS_IF_EXISTS)
1094 # define IUTEST_HAS_IF_EXISTS 0
1098 #if !defined(IUTEST_HAS_ANALYSIS_ASSUME)
1099 # if defined(_MSC_VER) && (_MSC_VER >= 1500) && !defined(__CUDACC__)
1100 # define IUTEST_HAS_ANALYSIS_ASSUME 1
1101 # define IUTEST_ANALYSIS_ASSUME __analysis_assume
1110 #if !defined(IUTEST_HAS_ANALYSIS_ASSUME)
1111 # define IUTEST_HAS_ANALYSIS_ASSUME 0
1113 #if !defined(IUTEST_ANALYSIS_ASSUME)
1114 # if defined(IUTEST_NO_VARIADIC_MACROS)
1115 # define IUTEST_ANALYSIS_ASSUME(x) (void)0
1117 # define IUTEST_ANALYSIS_ASSUME(...) (void)0
1121 #if !defined(IUTEST_HAS_MS_CXX_MODULE)
1122 # if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023506
1123 # define IUTEST_HAS_MS_CXX_MODULE 1
1127 #if !defined(IUTEST_HAS_MS_CXX_MODULE)
1128 # define IUTEST_HAS_MS_CXX_MODULE 0
1131 #if IUTEST_HAS_MS_CXX_MODULE
1132 # define IUTEST_CXX_MODULE_EXPORT export
1134 # define IUTEST_CXX_MODULE_EXPORT
1140 #if !defined(IUTEST_HAS_GENERIC)
1141 # if defined(__clang__)
1142 # if __has_feature(c_generic_selections)
1143 # define IUTEST_HAS_GENERIC 1
1145 # elif defined(__GNUC__)
1152 #if !defined(IUTEST_HAS_GENERIC)
1153 # define IUTEST_HAS_GENERIC 0
1159 #if !defined(IUTEST_HAS_ATTRIBUTE)
1160 # if defined(__cpp_attributes) && __cpp_attributes >= 200809
1161 # define IUTEST_HAS_ATTRIBUTE 1
1162 # elif defined(__clang__)
1163 # if __has_feature(cxx_attributes)
1164 # define IUTEST_HAS_ATTRIBUTE 1
1166 # elif defined(__GNUC__)
1167 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
1168 # define IUTEST_HAS_ATTRIBUTE 1
1170 # elif defined(_MSC_VER)
1171 # if _MSC_VER > 1800
1172 # define IUTEST_HAS_ATTRIBUTE 1
1177 #if !defined(IUTEST_HAS_ATTRIBUTE)
1178 # define IUTEST_HAS_ATTRIBUTE 0
1182 #if !defined(IUTEST_HAS_ATTRIBUTE_DEPRECATED)
1183 # if defined(__has_cpp_attribute)
1184 # if __has_cpp_attribute(deprecated) >= 201309
1185 # define IUTEST_HAS_ATTRIBUTE_DEPRECATED 1
1187 # elif defined(__GNUC__)
1188 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
1189 # define IUTEST_HAS_ATTRIBUTE_DEPRECATED 1
1191 # elif defined(__clang__)
1192 # if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)
1193 # define IUTEST_HAS_ATTRIBUTE_DEPRECATED 1
1195 # elif defined(_MSC_VER)
1196 # define IUTEST_HAS_ATTRIBUTE_DEPRECATED IUTEST_HAS_ATTRIBUTE
1200 #if !defined(IUTEST_HAS_ATTRIBUTE_DEPRECATED)
1201 # define IUTEST_HAS_ATTRIBUTE_DEPRECATED 0
1205 #if !defined(IUTEST_ATTRIBUTE_DEPRECATED_)
1206 # if IUTEST_HAS_ATTRIBUTE_DEPRECATED
1207 # define IUTEST_ATTRIBUTE_DEPRECATED_ [[deprecated]]
1211 #if !defined(IUTEST_ATTRIBUTE_DEPRECATED_)
1212 # define IUTEST_ATTRIBUTE_DEPRECATED_
1216 #if !defined(IUTEST_ATTRIBUTE_UNUSED_)
1217 # if (defined(__GNUC__) && !defined(COMPILER_ICC))
1218 # define IUTEST_ATTRIBUTE_UNUSED_ __attribute__((unused))
1219 # elif defined(__clang__)
1220 # if __has_attribute(unused)
1221 # define IUTEST_ATTRIBUTE_UNUSED_ __attribute__((unused))
1226 #if !defined(IUTEST_ATTRIBUTE_UNUSED_)
1227 # define IUTEST_ATTRIBUTE_UNUSED_
1231 #if !defined(IUTEST_ATTRIBUTE_PURE_)
1232 # if defined(__GNUC__) && !defined(COMPILER_ICC)
1233 # define IUTEST_ATTRIBUTE_PURE_ __attribute__((pure))
1235 # define IUTEST_ATTRIBUTE_PURE_
1240 #if !defined(IUTEST_ATTRIBUTE_NORETURN_)
1241 # if IUTEST_HAS_ATTRIBUTE
1242 # define IUTEST_ATTRIBUTE_NORETURN_ [[noreturn]]
1243 # elif defined(__clang__)
1244 # if __has_attribute(noreturn)
1245 # define IUTEST_ATTRIBUTE_NORETURN_ __attribute__((noreturn))
1247 # elif defined(__GNUC__) && !defined(COMPILER_ICC)
1248 # define IUTEST_ATTRIBUTE_NORETURN_ __attribute__((noreturn))
1249 # elif defined(_MSC_VER)
1250 # define IUTEST_ATTRIBUTE_NORETURN_ __declspec(noreturn)
1254 #if !defined(IUTEST_ATTRIBUTE_NORETURN_)
1255 # define IUTEST_ATTRIBUTE_NORETURN_
1259 #if !defined(IUTEST_ATTRIBUTE_INIT_PRIORITY_)
1260 # if defined(__clang__)
1261 # if __has_attribute(init_priority)
1262 # define IUTEST_ATTRIBUTE_INIT_PRIORITY_(n) __attribute__((init_priority(n)))
1264 # elif defined(__GNUC__) && !defined(COMPILER_ICC)
1265 # define IUTEST_ATTRIBUTE_INIT_PRIORITY_(n) __attribute__((init_priority(n)))
1269 #if !defined(IUTEST_ATTRIBUTE_INIT_PRIORITY_)
1270 # define IUTEST_ATTRIBUTE_INIT_PRIORITY_(n)
1274 #if !defined(IUTEST_ATTRIBUTE_FORMAT)
1275 # if defined(__has_attribute)
1276 # if __has_attribute(format)
1277 # define IUTEST_ATTRIBUTE_FORMAT(fmt, fi, vi) __attribute__ ((__format__ (fmt, fi, vi)))
1279 # elif defined(__GNUC__) && !defined(COMPILER_ICC)
1280 # define IUTEST_ATTRIBUTE_FORMAT(fmt, fi, vi) __attribute__ ((__format__ (fmt, fi, vi)))
1285 #if !defined(IUTEST_ATTRIBUTE_FORMAT_PRINTF) && defined(IUTEST_ATTRIBUTE_FORMAT)
1286 # if defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)
1287 # if !defined(__MINGW_PRINTF_FORMAT)
1288 # define __MINGW_PRINTF_FORMAT gnu_printf
1290 # define IUTEST_ATTRIBUTE_FORMAT_PRINTF(fi, vi) IUTEST_ATTRIBUTE_FORMAT(__MINGW_PRINTF_FORMAT, fi, vi)
1292 # define IUTEST_ATTRIBUTE_FORMAT_PRINTF(fi, vi) IUTEST_ATTRIBUTE_FORMAT(__printf__, fi, vi)
1296 #if !defined(IUTEST_ATTRIBUTE_FORMAT)
1297 # define IUTEST_ATTRIBUTE_FORMAT(fmt, fi, vi)
1299 #if !defined(IUTEST_ATTRIBUTE_FORMAT_PRINTF)
1300 # define IUTEST_ATTRIBUTE_FORMAT_PRINTF(fi, vi)
1305 #if !defined(IUTEST_HAS_MEMORY_SANITIZER)
1306 # if defined(__has_feature)
1307 # if __has_feature(memory_sanitizer)
1308 # define IUTEST_HAS_MEMORY_SANITIZER 1
1313 #if !defined(IUTEST_HAS_MEMORY_SANITIZER)
1314 # define IUTEST_HAS_MEMORY_SANITIZER 0
1317 #if !defined(IUTEST_ATTRIBUTE_NO_SANITIZE_MEMORY)
1318 # if IUTEST_HAS_MEMORY_SANITIZER
1319 # if defined(__clang__)
1320 # define IUTEST_ATTRIBUTE_NO_SANITIZE_MEMORY __attribute__((no_sanitize_memory))
1321 # elif defined(__GNUC__) && !defined(COMPILER_ICC)
1322 # define IUTEST_ATTRIBUTE_NO_SANITIZE_MEMORY __attribute__((no_sanitize_memory))
1327 #if !defined(IUTEST_ATTRIBUTE_NO_SANITIZE_MEMORY)
1328 # define IUTEST_ATTRIBUTE_NO_SANITIZE_MEMORY
1332 #if !defined(IUTEST_HAS_ADDRESS_SANITIZER)
1333 # if defined(__has_feature)
1334 # if __has_feature(address_sanitizer)
1335 # define IUTEST_HAS_ADDRESS_SANITIZER 1
1340 #if !defined(IUTEST_HAS_ADDRESS_SANITIZER)
1341 # define IUTEST_HAS_ADDRESS_SANITIZER 0
1344 #if !defined(IUTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS)
1345 # if IUTEST_HAS_ADDRESS_SANITIZER
1346 # if defined(__clang__)
1347 # define IUTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
1348 # elif defined(__GNUC__) && !defined(COMPILER_ICC)
1349 # define IUTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
1354 #if !defined(IUTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS)
1355 # define IUTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS
1359 #if !defined(IUTEST_HAS_THREAD_SANITIZER)
1360 # if defined(__has_feature)
1361 # if __has_feature(thread_sanitizer)
1362 # define IUTEST_HAS_THREAD_SANITIZER 1
1367 #if !defined(IUTEST_HAS_THREAD_SANITIZER)
1368 # define IUTEST_HAS_THREAD_SANITIZER 0
1371 #if !defined(IUTEST_ATTRIBUTE_NO_SANITIZE_THREAD)
1372 # if IUTEST_HAS_THREAD_SANITIZER
1373 # if defined(__clang__)
1374 # define IUTEST_ATTRIBUTE_NO_SANITIZE_THREAD __attribute__((no_sanitize_thread))
1375 # elif defined(__GNUC__) && !defined(COMPILER_ICC)
1376 # define IUTEST_ATTRIBUTE_NO_SANITIZE_THREAD __attribute__((no_sanitize_thread))
1381 #if !defined(IUTEST_ATTRIBUTE_NO_SANITIZE_THREAD)
1382 # define IUTEST_ATTRIBUTE_NO_SANITIZE_THREAD
1385 #if !defined(IUTEST_ATTRIBUTE_NO_SANITIZE_ALL)
1386 # define IUTEST_ATTRIBUTE_NO_SANITIZE_ALL \
1387 IUTEST_ATTRIBUTE_NO_SANITIZE_MEMORY \
1388 IUTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS \
1389 IUTEST_ATTRIBUTE_NO_SANITIZE_THREAD
1392 #if !defined(IUTEST_ATTRIBUTE_NO_SANITIZE_ALL)
1393 # define IUTEST_ATTRIBUTE_NO_SANITIZE_ALL
1402 #if defined(_MSC_VER)
1404 # define IUTEST_WORKAROUND_MSC_STLSTREAM_C4250() \
1405 void _Add_vtordisp1() {} \
1406 void _Add_vtordisp2() {}
1408 # define IUTEST_WORKAROUND_MSC_STLSTREAM_C4250()
1418 #if defined(_MSC_VER) && _MSC_VER < 1300
1419 # pragma warning(disable:4786) // ident trunc to '255' chars in debug info
1422 #endif // INCG_IRIS_IUTEST_COMPILER_HPP_6DDB27E8_E2FF_4754_80B0_F500025820C4_