6#pragma qt_class(QtCompilerDetection)
7#pragma qt_sync_skip_header_check
8#pragma qt_sync_stop_processing
11#ifndef QCOMPILERDETECTION_H
12#define QCOMPILERDETECTION_H
14#include <QtCore/qprocessordetection.h>
15#include <QtCore/qsystemdetection.h>
16#include <QtCore/qtconfiginclude.h>
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
48#if defined(__COVERITY__)
50# define Q_COMPILER_COMPLAINS_ABOUT_RETURN_AFTER_UNREACHABLE
54#if defined(__DMC__) || defined(__SC__)
57# if defined(__SC__) && __SC__ < 0x750
58# error "Compiler not supported"
61#elif defined(_MSC_VER)
62# define Q_CC_MSVC (_MSC_VER)
64# define Q_CC_MSVC_ONLY Q_CC_MSVC
67# define Q_CC_CLANG ((__clang_major__ * 100
) + __clang_minor__)
68# define Q_CC_CLANG_ONLY Q_CC_CLANG
70# define Q_OUTOFLINE_TEMPLATE inline
71# define Q_COMPILER_MANGLES_RETURN_TYPE
72# define Q_COMPILER_MANGLES_ACCESS_SPECIFIER
73# define Q_FUNC_INFO __FUNCSIG__
74# define Q_ASSUME_IMPL(expr) __assume(expr)
75# define Q_UNREACHABLE_IMPL() __assume(0
)
76# define Q_DECL_EXPORT __declspec(dllexport)
77# define Q_DECL_IMPORT __declspec(dllimport)
79# define QT_MAKE_CHECKED_ARRAY_ITERATOR(x, N) stdext::make_checked_array_iterator(x, size_t(N))
81# define Q_COMPILER_COMPLAINS_ABOUT_RETURN_AFTER_UNREACHABLE
83#elif defined(__BORLANDC__) || defined(__TURBOC__)
85# define Q_INLINE_TEMPLATE
86# if __BORLANDC__ < 0x502
87# error "Compiler not supported"
90#elif defined(__WATCOMC__)
94
95
96#elif defined(__ARMCC__) || defined(__CC_ARM)
99# define __is_empty(X) false
100# define __is_pod(X) false
101# define Q_DECL_DEPRECATED __attribute__ ((__deprecated__))
103# define Q_DECL_EXPORT __attribute__((visibility("default")))
104# define Q_DECL_IMPORT __attribute__((visibility("default")))
105# define Q_DECL_HIDDEN __attribute__((visibility("hidden")))
107# define Q_DECL_EXPORT __declspec(dllexport)
108# define Q_DECL_IMPORT __declspec(dllimport)
111#elif defined(__GNUC__
)
112# define Q_CC_GNU (__GNUC__
* 100
+ __GNUC_MINOR__
)
113# if defined(__MINGW32__)
116# if defined(__clang__
)
118# if defined(__apple_build_version__)
125# if __apple_build_version__ >= 14030022
126# define Q_CC_CLANG 1500
127# elif __apple_build_version__ >= 14000029
128# define Q_CC_CLANG 1400
129# elif __apple_build_version__ >= 13160021
130# define Q_CC_CLANG 1300
131# elif __apple_build_version__ >= 13000029
132# define Q_CC_CLANG 1200
133# elif __apple_build_version__ >= 12050022
134# define Q_CC_CLANG 1110
135# elif __apple_build_version__ >= 12000032
136# define Q_CC_CLANG 1000
137# elif __apple_build_version__ >= 11030032
138# define Q_CC_CLANG 900
139# elif __apple_build_version__ >= 11000033
140# define Q_CC_CLANG 800
142# error "Unsupported Apple Clang version"
146# define Q_CC_CLANG ((__clang_major__
* 100
) + __clang_minor__
)
148# define Q_CC_CLANG_ONLY Q_CC_CLANG
150# define Q_ASSUME_IMPL(expr) __builtin_assume(expr)
152# define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable()
154# define Q_UNREACHABLE_IMPL() __builtin_unreachable()
157# define __has_extension __has_feature
159# if defined(__APPLE__)
161# define Q_DECL_CF_RETURNS_RETAINED __attribute__((cf_returns_retained))
163# define Q_DECL_NS_RETURNS_AUTORELEASED __attribute__((ns_returns_autoreleased))
166# ifdef __EMSCRIPTEN__
167# define Q_CC_EMSCRIPTEN
171# define Q_CC_GNU_ONLY Q_CC_GNU
173# define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable()
174# define Q_UNREACHABLE_IMPL() __builtin_unreachable()
175# define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text)))
180# define Q_DECL_EXPORT __declspec(dllexport)
181# define Q_DECL_IMPORT __declspec(dllimport)
183# define Q_DECL_EXPORT_OVERRIDABLE __attribute__((visibility("default"), weak))
184# ifdef QT_USE_PROTECTED_VISIBILITY
185# define Q_DECL_EXPORT __attribute__((visibility("protected")))
187# define Q_DECL_EXPORT __attribute__((visibility("default")))
189# define Q_DECL_IMPORT __attribute__((visibility("default")))
190# define Q_DECL_HIDDEN __attribute__((visibility("hidden")))
193# define Q_FUNC_INFO __PRETTY_FUNCTION__
194# define Q_TYPEOF(expr) __typeof__(expr)
195# define Q_DECL_DEPRECATED __attribute__ ((__deprecated__))
196# define Q_DECL_UNUSED __attribute__((__unused__))
197# define Q_LIKELY(expr) __builtin_expect(!!(expr), true)
198# define Q_UNLIKELY(expr) __builtin_expect(!!(expr), false)
199# define Q_NORETURN __attribute__((__noreturn__))
200# define Q_REQUIRED_RESULT __attribute__ ((__warn_unused_result__))
201# define Q_DECL_PURE_FUNCTION __attribute__((pure))
202# define Q_DECL_CONST_FUNCTION __attribute__((const))
203# define Q_DECL_COLD_FUNCTION __attribute__((cold))
204# define Q_PACKED __attribute__ ((__packed__))
206# define QT_NO_ARM_EABI
208# if Q_CC_GNU
>= 403
&& !defined(Q_CC_CLANG
)
209# define Q_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234#elif defined(__xlC__)
237# error "Compiler not supported"
238# elif __xlC__ >= 0x0600
239# define Q_TYPEOF(expr) __typeof__(expr)
240# define Q_PACKED __attribute__((__packed__))
244
245
246
247
248#elif defined(__DECCXX) || defined(__DECC)
251
256
257
258# if !defined(_BOOL_EXISTS)
259# error "Compiler not supported"
263
264# if __DECCXX_VER < 60060000
265# define Q_BROKEN_TEMPLATE_SPECIALIZATION
268# define Q_OUTOFLINE_TEMPLATE inline
271
279
280
281
282#elif !defined(Q_OS_HPUX) && (defined(__EDG) || defined(__EDG__))
285
286
287
288
289
290
291# if !defined(_BOOL) && !defined(__BOOL_DEFINED) && !defined(__ghs)
292# error "Compiler not supported"
296# if defined(__COMO__)
300
301
302
309# define Q_DECL_DEPRECATED __attribute__ ((__deprecated__))
310# define Q_PACKED __attribute__ ((__packed__))
311# define Q_FUNC_INFO __PRETTY_FUNCTION__
312# define Q_TYPEOF(expr) __typeof__(expr)
313# define Q_UNREACHABLE_IMPL()
314# if defined(__cplusplus)
315# define Q_COMPILER_AUTO_TYPE
316# define Q_COMPILER_STATIC_ASSERT
317# define Q_COMPILER_RANGE_FOR
318# if __GHS_VERSION_NUMBER >= 201505
319# define Q_COMPILER_ALIGNAS
320# define Q_COMPILER_ALIGNOF
321# define Q_COMPILER_ATOMICS
322# define Q_COMPILER_ATTRIBUTES
323# define Q_COMPILER_AUTO_FUNCTION
324# define Q_COMPILER_CLASS_ENUM
325# define Q_COMPILER_DECLTYPE
326# define Q_COMPILER_DEFAULT_MEMBERS
327# define Q_COMPILER_DELETE_MEMBERS
328# define Q_COMPILER_DELEGATING_CONSTRUCTORS
329# define Q_COMPILER_EXPLICIT_CONVERSIONS
330# define Q_COMPILER_EXPLICIT_OVERRIDES
331# define Q_COMPILER_EXTERN_TEMPLATES
332# define Q_COMPILER_INHERITING_CONSTRUCTORS
333# define Q_COMPILER_INITIALIZER_LISTS
334# define Q_COMPILER_LAMBDA
335# define Q_COMPILER_NONSTATIC_MEMBER_INIT
336# define Q_COMPILER_NOEXCEPT
337# define Q_COMPILER_NULLPTR
338# define Q_COMPILER_RANGE_FOR
339# define Q_COMPILER_RAW_STRINGS
340# define Q_COMPILER_REF_QUALIFIERS
341# define Q_COMPILER_RVALUE_REFS
342# define Q_COMPILER_STATIC_ASSERT
343# define Q_COMPILER_TEMPLATE_ALIAS
344# define Q_COMPILER_THREAD_LOCAL
345# define Q_COMPILER_UDL
346# define Q_COMPILER_UNICODE_STRINGS
347# define Q_COMPILER_UNIFORM_INIT
348# define Q_COMPILER_UNRESTRICTED_UNIONS
349# define Q_COMPILER_VARIADIC_MACROS
350# define Q_COMPILER_VARIADIC_TEMPLATES
354# elif defined(__DCC__)
357# error "Compiler not supported"
361# elif defined(__USLC__) && defined(__SCO_VERSION__)
364# if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010
)
365# define Q_OUTOFLINE_TEMPLATE inline
369# elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER)
373
379
380#elif defined(_DIAB_TOOL)
382# define Q_FUNC_INFO __PRETTY_FUNCTION__
385#elif defined(__HIGHC__)
388#elif defined(__SUNPRO_CC) || defined(__SUNPRO_C)
390# define Q_COMPILER_MANGLES_RETURN_TYPE
392
393
394
395# if __SUNPRO_CC >= 0x500
396# define QT_NO_TEMPLATE_TEMPLATE_PARAMETERS
398# if __SUNPRO_CC >= 0x590
399# define Q_TYPEOF(expr) __typeof__(expr)
401# if __SUNPRO_CC >= 0x550
402# define Q_DECL_EXPORT __global
405# error "Compiler not supported"
409# error "Compiler not supported"
413
418# error "Compiler not supported"
420# define Q_BROKEN_TEMPLATE_SPECIALIZATION
423# error "Qt has not been tested with this compiler - see http://www.qt-project.org/"
427
428
429
430
431
433# define __has_builtin(x) 0
436# define __has_feature(x) 0
439# define __has_attribute(x) 0
442# define __has_cpp_attribute(x) 0
445# define __has_include(x) 0
448# define __has_include_next(x) 0
452
453
454
455
456
457#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
458# define QT_ASAN_ENABLED
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
519
520
521#define Q_COMPILER_THREADSAFE_STATICS
523#if defined(Q_CC_CLANG
)
525# define Q_COMPILER_RESTRICTED_VLA
527# define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text)))
533# define Q_COMPILER_BINARY_LITERALS
537# if Q_CC_CLANG
>= 209
538# if !defined(__STRICT_ANSI__) || defined(__GXX_EXPERIMENTAL_CXX0X__
)
539 || (defined(__cplusplus
) && (__cplusplus
>= 201103L
))
540 || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L
))
541# define Q_COMPILER_VARIADIC_MACROS
546# if (defined(__cplusplus
) && __cplusplus
>= 201103L
)
547 || defined(__GXX_EXPERIMENTAL_CXX0X__
)
550# define Q_COMPILER_ALIGNAS
551# define Q_COMPILER_ALIGNOF
554# define Q_COMPILER_ATOMICS
557# define Q_COMPILER_ATTRIBUTES
560# define Q_COMPILER_AUTO_FUNCTION
561# define Q_COMPILER_AUTO_TYPE
564# define Q_COMPILER_CLASS_ENUM
567# define Q_COMPILER_CONSTEXPR
570# define Q_COMPILER_DECLTYPE
573# define Q_COMPILER_DEFAULT_MEMBERS
576# define Q_COMPILER_DELETE_MEMBERS
579# define Q_COMPILER_DELEGATING_CONSTRUCTORS
582# define Q_COMPILER_EXPLICIT_CONVERSIONS
585# define Q_COMPILER_EXPLICIT_OVERRIDES
588# define Q_COMPILER_INHERITING_CONSTRUCTORS
591# define Q_COMPILER_INITIALIZER_LISTS
592# define Q_COMPILER_UNIFORM_INIT
595# define Q_COMPILER_LAMBDA
598# define Q_COMPILER_NOEXCEPT
601# define Q_COMPILER_NONSTATIC_MEMBER_INIT
604# define Q_COMPILER_NULLPTR
607# define Q_COMPILER_RANGE_FOR
610# define Q_COMPILER_RAW_STRINGS
613# define Q_COMPILER_REF_QUALIFIERS
616# define Q_COMPILER_RVALUE_REFS
619# define Q_COMPILER_STATIC_ASSERT
622# define Q_COMPILER_TEMPLATE_ALIAS
625# if !defined(__FreeBSD__)
626# define Q_COMPILER_THREAD_LOCAL
630# define Q_COMPILER_UDL
633# define Q_COMPILER_UNICODE_STRINGS
636# define Q_COMPILER_UNRESTRICTED_UNIONS
639# define Q_COMPILER_VARIADIC_TEMPLATES
642# if Q_CC_CLANG
>= 209
643# define Q_COMPILER_EXTERN_TEMPLATES
648# if defined(__cplusplus
) && __cplusplus
> 201103L
653# define Q_COMPILER_GENERIC_LAMBDA
656# define Q_COMPILER_LAMBDA_CAPTURES
659# define Q_COMPILER_RELAXED_CONSTEXPR_FUNCTIONS
662# define Q_COMPILER_RETURN_TYPE_DEDUCTION
665# define Q_COMPILER_VARIABLE_TEMPLATES
668# define Q_COMPILER_VLA
672# if defined(__STDC_VERSION__)
673# if __has_feature(c_static_assert)
674# define Q_COMPILER_STATIC_ASSERT
676# if __has_feature(c_thread_local) && __has_include(<threads.h>)
677# if !defined(__FreeBSD__)
678# define Q_COMPILER_THREAD_LOCAL
684# define Q_DECL_UNUSED __attribute__((__unused__))
689#if defined(Q_CC_GNU_ONLY)
690# define Q_COMPILER_RESTRICTED_VLA
693# define Q_COMPILER_BINARY_LITERALS
695# if !defined(__STRICT_ANSI__) || defined(__GXX_EXPERIMENTAL_CXX0X__)
696 || (defined(__cplusplus) && (__cplusplus >= 201103L
))
697 || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L
))
699# define Q_COMPILER_VARIADIC_MACROS
701# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
704# define Q_COMPILER_DECLTYPE
705# define Q_COMPILER_RVALUE_REFS
706# define Q_COMPILER_STATIC_ASSERT
710# define Q_COMPILER_AUTO_FUNCTION
711# define Q_COMPILER_AUTO_TYPE
712# define Q_COMPILER_EXTERN_TEMPLATES
713# define Q_COMPILER_UNIFORM_INIT
714# define Q_COMPILER_UNICODE_STRINGS
715# define Q_COMPILER_VARIADIC_TEMPLATES
719# define Q_COMPILER_EXPLICIT_CONVERSIONS
721
722# define Q_COMPILER_INITIALIZER_LISTS
723# define Q_COMPILER_LAMBDA
724# define Q_COMPILER_RAW_STRINGS
725# define Q_COMPILER_CLASS_ENUM
729
730
731# define Q_COMPILER_DEFAULT_MEMBERS
732# define Q_COMPILER_DELETE_MEMBERS
734# define Q_COMPILER_NULLPTR
735# define Q_COMPILER_UNRESTRICTED_UNIONS
736# define Q_COMPILER_RANGE_FOR
740
741
742
743# define Q_COMPILER_ATOMICS
745
746# define Q_COMPILER_NOEXCEPT
748# define Q_COMPILER_NONSTATIC_MEMBER_INIT
749# define Q_COMPILER_DELEGATING_CONSTRUCTORS
750# define Q_COMPILER_EXPLICIT_OVERRIDES
751# define Q_COMPILER_TEMPLATE_ALIAS
752# define Q_COMPILER_UDL
755# define Q_COMPILER_ATTRIBUTES
756# define Q_COMPILER_ALIGNAS
757# define Q_COMPILER_ALIGNOF
758# define Q_COMPILER_INHERITING_CONSTRUCTORS
759# define Q_COMPILER_THREAD_LOCAL
760# if Q_CC_GNU > 408
|| __GNUC_PATCHLEVEL__ >= 1
761# define Q_COMPILER_REF_QUALIFIERS
766
767# define Q_COMPILER_CONSTEXPR
770# if __cplusplus > 201103L
774# define Q_COMPILER_LAMBDA_CAPTURES
775# define Q_COMPILER_RETURN_TYPE_DEDUCTION
778# if defined(__STDC_VERSION__) && __STDC_VERSION__ > 199901L
781# define Q_COMPILER_STATIC_ASSERT
783# if Q_CC_GNU >= 409
&& defined(__has_include)
785# if __has_include(<threads.h>)
786# define Q_COMPILER_THREAD_LOCAL
792#if defined(Q_CC_MSVC) && !defined(Q_CC_CLANG
)
793# if defined(__cplusplus)
795# define Q_COMPILER_VARIADIC_MACROS
798
799
800
801
802
803
804
805
807# define Q_COMPILER_AUTO_FUNCTION
808# define Q_COMPILER_AUTO_TYPE
809# define Q_COMPILER_DECLTYPE
810# define Q_COMPILER_EXTERN_TEMPLATES
811# define Q_COMPILER_LAMBDA
812# define Q_COMPILER_NULLPTR
813# define Q_COMPILER_RVALUE_REFS
814# define Q_COMPILER_STATIC_ASSERT
816# define Q_COMPILER_EXPLICIT_OVERRIDES
817# define Q_COMPILER_CLASS_ENUM
818# define Q_COMPILER_ATOMICS
820# define Q_COMPILER_DELETE_MEMBERS
821# define Q_COMPILER_DELEGATING_CONSTRUCTORS
822# define Q_COMPILER_EXPLICIT_CONVERSIONS
823# define Q_COMPILER_NONSTATIC_MEMBER_INIT
824# define Q_COMPILER_RAW_STRINGS
825# define Q_COMPILER_TEMPLATE_ALIAS
826# define Q_COMPILER_VARIADIC_TEMPLATES
827# define Q_COMPILER_INITIALIZER_LISTS
829# define Q_COMPILER_DEFAULT_MEMBERS
830# define Q_COMPILER_ALIGNAS
831# define Q_COMPILER_ALIGNOF
832# define Q_COMPILER_INHERITING_CONSTRUCTORS
833# define Q_COMPILER_NOEXCEPT
834# define Q_COMPILER_RANGE_FOR
835# define Q_COMPILER_REF_QUALIFIERS
836# define Q_COMPILER_THREAD_LOCAL
837# define Q_COMPILER_UDL
838# define Q_COMPILER_UNICODE_STRINGS
839# define Q_COMPILER_UNRESTRICTED_UNIONS
840# if _MSC_FULL_VER >= 190023419
841# define Q_COMPILER_ATTRIBUTES
844# define Q_COMPILER_UNIFORM_INIT
847# define Q_COMPILER_CONSTEXPR
854# define Q_COMPILER_LACKS_THREE_WAY_COMPARE_SYMMETRY
857# define Q_COMPILER_SLOW_QSTRNLEN_COMPILATION
861#ifdef Q_COMPILER_UNICODE_STRINGS
862# define Q_STDLIB_UNICODE_STRINGS
863#elif defined(__cplusplus)
864# error "Qt6 requires Unicode string support in both the compiler and the standard library"
869# if defined(Q_OS_QNX)
878# if !defined(__GLIBCXX__) && !defined(_LIBCPP_VERSION)
884# if !defined(_HAS_CPP0X) || !_HAS_CPP0X
886# undef Q_COMPILER_INITIALIZER_LISTS
887# undef Q_COMPILER_RVALUE_REFS
888# undef Q_COMPILER_REF_QUALIFIERS
889# undef Q_COMPILER_NOEXCEPT
891# undef Q_STDLIB_UNICODE_STRINGS
893# if !defined(_HAS_NULLPTR_T) || !_HAS_NULLPTR_T
894# undef Q_COMPILER_NULLPTR
896# if !defined(_HAS_CONSTEXPR) || !_HAS_CONSTEXPR
899# undef Q_COMPILER_CONSTEXPR
903# if defined(Q_CC_CLANG
) && defined(Q_OS_DARWIN)
904# if defined(__GNUC_LIBSTD__) && ((__GNUC_LIBSTD__-0
) * 100
+ __GNUC_LIBSTD_MINOR__-0
<= 402
)
907# undef Q_COMPILER_INITIALIZER_LISTS
908# undef Q_COMPILER_RVALUE_REFS
909# undef Q_COMPILER_REF_QUALIFIERS
911# undef Q_COMPILER_ATOMICS
913# if defined(__cpp_lib_memory_resource)
914 && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 140000
)
915 || (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 170000
))
916# undef __cpp_lib_memory_resource
922#if defined(Q_COMPILER_DEFAULT_MEMBERS
) && defined(Q_COMPILER_DELETE_MEMBERS
)
923# define Q_COMPILER_DEFAULT_DELETE_MEMBERS
927
928
929
930#define Q_ALIGNOF(x) alignof(x)
931#define Q_DECL_ALIGN(n) alignas(n)
934# define Q_CONSTEXPR constexpr
935# define Q_DECL_CONSTEXPR constexpr
936# define Q_DECL_EQ_DEFAULT = default
937# define Q_DECL_EQ_DELETE = delete
938# define Q_DECL_FINAL final
939# define Q_DECL_NOEXCEPT noexcept
940# define Q_DECL_NOEXCEPT_EXPR(x) noexcept(x)
941# define Q_DECL_OVERRIDE override
942# define Q_DECL_RELAXED_CONSTEXPR constexpr
943# define Q_NULLPTR nullptr
944# define Q_RELAXED_CONSTEXPR constexpr
946# define Q_CONSTEXPR const
947# define Q_DECL_CONSTEXPR
948# define Q_DECL_RELAXED_CONSTEXPR
949# define Q_NULLPTR NULL
950# define Q_RELAXED_CONSTEXPR const
952# define Q_DECL_NOEXCEPT __attribute__((__nothrow__))
954# define Q_DECL_NOEXCEPT
960# undef Q_REQUIRED_RESULT
961# define Q_REQUIRED_RESULT [[nodiscard]]
966# ifndef Q_NODISCARD_CTOR
967# define Q_NODISCARD_CTOR [[nodiscard]]
970# ifndef Q_NODISCARD_X
971# define Q_NODISCARD_X(message) [[nodiscard(message)]]
973# ifndef Q_NODISCARD_CTOR_X
974# define Q_NODISCARD_CTOR_X(message) [[nodiscard(message)]]
980# define Q_DECL_UNUSED [[maybe_unused]]
985# define Q_NORETURN [[noreturn]]
990# undef Q_DECL_DEPRECATED
993# undef Q_DECL_DEPRECATED_X
995# define Q_DECL_DEPRECATED [[deprecated]]
996# define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
1002#ifndef Q_DECL_CONSTEXPR_DTOR
1003# if __cpp_constexpr
>= 201907L
1004# define Q_DECL_CONSTEXPR_DTOR constexpr
1006# define Q_DECL_CONSTEXPR_DTOR inline
1010#ifndef Q_CONSTEXPR_DTOR
1011# if __cpp_constexpr
>= 201907L
1012# define Q_CONSTEXPR_DTOR constexpr
1014# define Q_CONSTEXPR_DTOR const
1018#ifndef Q_DECL_EQ_DELETE_X
1022# if defined(__cpp_deleted_function
) && __cpp_deleted_function
>= 202403L
1023 && (!defined(Q_CC_CLANG_ONLY
) || Q_CC_CLANG_ONLY
>= 2000
|| __cplusplus
> 202302L
)
1024# define Q_DECL_EQ_DELETE_X(reason) = delete(reason)
1026# define Q_DECL_EQ_DELETE_X(reason) = delete
1030#ifndef Q_LIKELY_BRANCH
1032# define Q_LIKELY_BRANCH [[likely]]
1033# define Q_UNLIKELY_BRANCH [[unlikely]]
1035# define Q_LIKELY_BRANCH
1036# define Q_UNLIKELY_BRANCH
1041
1042
1048# define Q_LIKELY(x) (x)
1051# define Q_UNLIKELY(x) (x)
1054# define Q_ASSUME_IMPL(expr) qt_noop()
1057# define Q_UNREACHABLE_IMPL() qt_noop()
1060# define Q_ALLOC_SIZE(x)
1063# define Q_REQUIRED_RESULT
1066# define Q_NODISCARD_X(message) Q_REQUIRED_RESULT
1069# define Q_NODISCARD_CTOR
1072# define Q_NODISCARD_CTOR_X(message) Q_NODISCARD_CTOR
1075# define Q_DECL_DEPRECATED
1077#ifndef Q_DECL_VARIABLE_DEPRECATED
1081# define Q_DECL_DEPRECATED_X(text) Q_DECL_DEPRECATED
1084# define Q_DECL_EXPORT
1087# define Q_DECL_EXPORT_OVERRIDABLE Q_DECL_EXPORT
1090# define Q_DECL_IMPORT
1093# define Q_DECL_HIDDEN
1096# define Q_DECL_UNUSED
1099# define Q_DECL_UNUSED_MEMBER
1102# if defined(Q_OS_SOLARIS) || defined(Q_CC_XLC)
1103# define Q_FUNC_INFO __FILE__ "(line number unavailable)"
1105# define Q_FUNC_INFO __FILE__ ":" QT_STRINGIFY(__LINE__)
1108#ifndef Q_DECL_CF_RETURNS_RETAINED
1109# define Q_DECL_CF_RETURNS_RETAINED
1111#ifndef Q_DECL_NS_RETURNS_AUTORELEASED
1112# define Q_DECL_NS_RETURNS_AUTORELEASED
1115# define Q_DECL_PURE_FUNCTION
1118# define Q_DECL_CONST_FUNCTION Q_DECL_PURE_FUNCTION
1121# define Q_DECL_COLD_FUNCTION
1123#ifndef QT_MAKE_UNCHECKED_ARRAY_ITERATOR
1124# define QT_MAKE_UNCHECKED_ARRAY_ITERATOR(x) (x)
1126#ifndef QT_MAKE_CHECKED_ARRAY_ITERATOR
1127# define QT_MAKE_CHECKED_ARRAY_ITERATOR(x, N) (x)
1131
1132
1133
1135# define Q_WEAK_OVERLOAD template <typename = void>
1137# define Q_WEAK_OVERLOAD
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1159# define QT_POST_CXX17_API_IN_EXPORTED_CLASS template <typename = void>
1161# define QT_POST_CXX17_API_IN_EXPORTED_CLASS
1165
1166
1168#define QT_DO_PRAGMA(text) _Pragma(#text)
1169#if defined(Q_CC_MSVC) && !defined(Q_CC_CLANG
)
1171# define QT_WARNING_PUSH __pragma(warning(push))
1172# define QT_WARNING_POP __pragma(warning(pop))
1173# define QT_WARNING_DISABLE_MSVC(number) __pragma(warning(disable: number))
1174# define QT_WARNING_DISABLE_INTEL(number)
1175# define QT_WARNING_DISABLE_CLANG(text)
1176# define QT_WARNING_DISABLE_GCC(text)
1177# define QT_WARNING_DISABLE_DEPRECATED QT_WARNING_DISABLE_MSVC(4996
)
1178# define QT_WARNING_DISABLE_FLOAT_COMPARE
1179# define QT_WARNING_DISABLE_INVALID_OFFSETOF
1180#elif defined(Q_CC_CLANG
)
1181# define QT_WARNING_PUSH QT_DO_PRAGMA(clang diagnostic push)
1182# define QT_WARNING_POP QT_DO_PRAGMA(clang diagnostic pop)
1183# define QT_WARNING_DISABLE_CLANG(text) QT_DO_PRAGMA(clang diagnostic ignored text)
1184# define QT_WARNING_DISABLE_GCC(text)
1185# define QT_WARNING_DISABLE_INTEL(number)
1186# define QT_WARNING_DISABLE_MSVC(number)
1190#elif defined(Q_CC_GNU) && (__GNUC__ * 100
+ __GNUC_MINOR__ >= 406
)
1191# define QT_WARNING_PUSH QT_DO_PRAGMA(GCC diagnostic push)
1192# define QT_WARNING_POP QT_DO_PRAGMA(GCC diagnostic pop)
1193# define QT_WARNING_DISABLE_GCC(text) QT_DO_PRAGMA(GCC diagnostic ignored text)
1194# define QT_WARNING_DISABLE_CLANG(text)
1195# define QT_WARNING_DISABLE_INTEL(number)
1196# define QT_WARNING_DISABLE_MSVC(number)
1197# define QT_WARNING_DISABLE_DEPRECATED QT_WARNING_DISABLE_GCC("-Wdeprecated-declarations")
1198# define QT_WARNING_DISABLE_FLOAT_COMPARE QT_WARNING_DISABLE_GCC("-Wfloat-equal")
1199# define QT_WARNING_DISABLE_INVALID_OFFSETOF QT_WARNING_DISABLE_GCC("-Winvalid-offsetof")
1201# define QT_WARNING_DISABLE_GCC(text)
1202# define QT_WARNING_PUSH
1203# define QT_WARNING_POP
1204# define QT_WARNING_DISABLE_INTEL(number)
1205# define QT_WARNING_DISABLE_MSVC(number)
1206# define QT_WARNING_DISABLE_CLANG(text)
1207# define QT_WARNING_DISABLE_GCC(text)
1208# define QT_WARNING_DISABLE_DEPRECATED
1209# define QT_WARNING_DISABLE_FLOAT_COMPARE
1210# define QT_WARNING_DISABLE_INVALID_OFFSETOF
1213#ifndef QT_IGNORE_DEPRECATIONS
1214#define QT_IGNORE_DEPRECATIONS(statement)
1228#define Q_OFFSETOF(Class, member)
1231 return offsetof(Class, member);
1236
1237
1238#ifndef QT_NO_KEYWORDS
1239# if defined(Q_CC_MIPS) || (defined(Q_CC_HPACC) && defined(__ia64))
1240# define for if (0
) {} else for
1244#ifdef Q_COMPILER_RVALUE_REFS
1245#define qMove(x) std::move(x)
1250#if defined(__cplusplus
)
1252# define Q_FALLTHROUGH() [[clang::fallthrough]]
1253#elif __has_cpp_attribute(gnu::fallthrough)
1254# define Q_FALLTHROUGH() [[gnu::fallthrough]]
1255#elif __has_cpp_attribute(fallthrough)
1256# define Q_FALLTHROUGH() [[fallthrough]]
1261# define Q_FALLTHROUGH() __attribute__((fallthrough))
1263# define Q_FALLTHROUGH() (void)0
1268# define Q_DECL_UNINITIALIZED __attribute__((uninitialized))
1270# define Q_DECL_UNINITIALIZED
1275
1276
1277#if !defined(Q_PROCESSOR_X86)
1278# undef QT_COMPILER_SUPPORTS_SSE2
1279# undef QT_COMPILER_SUPPORTS_SSE3
1280# undef QT_COMPILER_SUPPORTS_SSSE3
1281# undef QT_COMPILER_SUPPORTS_SSE4_1
1282# undef QT_COMPILER_SUPPORTS_SSE4_2
1283# undef QT_COMPILER_SUPPORTS_AVX
1284# undef QT_COMPILER_SUPPORTS_AVX2
1285# undef QT_COMPILER_SUPPORTS_F16C
1287#if !defined(Q_PROCESSOR_ARM)
1288# undef QT_COMPILER_SUPPORTS_NEON
1290#if !defined(Q_PROCESSOR_MIPS)
1291# undef QT_COMPILER_SUPPORTS_MIPS_DSP
1292# undef QT_COMPILER_SUPPORTS_MIPS_DSPR2
1296#if defined(__cplusplus
) && (__cplusplus
< 201703L
)
1298# error "Qt requires a C++17 compiler, and a suitable value for __cplusplus. On MSVC, you must pass the /Zc:__cplusplus option to the compiler."
1300# error "Qt requires a C++17 compiler"
1304#if defined(__cplusplus
) && defined(Q_CC_MSVC) && !defined(Q_CC_CLANG
)
1305# if Q_CC_MSVC < 1927
1307# error "Qt requires at least Visual Studio 2019 version 16.7 (VC++ version 14.27). Please upgrade."
1314static_assert(!std::is_convertible_v<std::nullptr_t,
bool>,
1315 "On MSVC you must pass the /permissive- option to the compiler.");
1318#if defined(QT_BOOTSTRAPPED) || defined(QT_USE_PROTECTED_VISIBILITY) || !defined(__ELF__
) || defined(__PIC__
)
1320#elif defined(__PIE__)
1321# error "-fPIE is not sufficient if Qt was configured with the -DFEATURE_reduce_relocations=ON "
1322 "CMake option. Compile your code with -fPIC and without -fPIE or compile Qt with "
1323 "-DFEATURE_no_direct_extern_access=ON."
1324#elif defined(QT_REDUCE_RELOCATIONS)
1325# error "You must build your code with position independent code if Qt was configured with the "
1326 "-DFEATURE_reduce_relocations=ON CMake option. Compile your code with -fPIC and "
1327 "without -fPIE or compile Qt with -DFEATURE_no_direct_extern_access=ON."
1330#ifdef Q_PROCESSOR_X86_32
1331# if defined(Q_CC_GNU)
1332# define QT_FASTCALL __attribute__((regparm(3
)))
1333# elif defined(Q_CC_MSVC)
1334# define QT_FASTCALL __fastcall
1343#if defined(Q_CC_GNU
) && !defined(__INSURE__)
1344# if defined(Q_CC_MINGW) && !defined(Q_CC_CLANG
)
1345# define Q_ATTRIBUTE_FORMAT_PRINTF(A, B)
1346 __attribute__((format(gnu_printf, (A), (B))))
1348# define Q_ATTRIBUTE_FORMAT_PRINTF(A, B)
1349 __attribute__((format(printf, (A), (B))))
1352# define Q_ATTRIBUTE_FORMAT_PRINTF(A, B)
1356# define Q_NEVER_INLINE __declspec(noinline)
1357# define Q_ALWAYS_INLINE __forceinline
1358#elif defined(Q_CC_GNU
)
1359# define Q_NEVER_INLINE __attribute__((noinline))
1360# define Q_ALWAYS_INLINE inline __attribute__((always_inline))
1362# define Q_NEVER_INLINE
1363# define Q_ALWAYS_INLINE inline
1368#if defined(Q_OS_WIN)
1369# if defined(Q_CC_MINGW) && defined(Q_PROCESSOR_X86_32)
1370# define QT_ENSURE_STACK_ALIGNED_FOR_SSE __attribute__ ((force_align_arg_pointer))
1372# define QT_ENSURE_STACK_ALIGNED_FOR_SSE
1374# define QT_WIN_CALLBACK CALLBACK QT_ENSURE_STACK_ALIGNED_FOR_SSE
1377#ifdef __cpp_conditional_explicit
1378#define Q_IMPLICIT explicit(false)
1383#if defined(__cplusplus
)
1385#ifdef __cpp_constinit
1386# if defined(Q_CC_MSVC) && !defined(Q_CC_CLANG)
1390# define Q_CONSTINIT constinit
1393# define Q_CONSTINIT [[clang::require_constant_initialization]]
1394#elif defined(Q_CC_GNU_ONLY) && Q_CC_GNU >= 1000
1395# define Q_CONSTINIT __constinit
1400#ifndef Q_OUTOFLINE_TEMPLATE
1401# define Q_OUTOFLINE_TEMPLATE
1403#ifndef Q_INLINE_TEMPLATE
1404# define Q_INLINE_TEMPLATE inline
1408
1409
1410
1411
1412#if !defined(QT_CC_WARNINGS)
1413# define QT_NO_WARNINGS
1415#if defined(QT_NO_WARNINGS
)
1416# if defined(Q_CC_MSVC)
1417QT_WARNING_DISABLE_MSVC(4251)
1418QT_WARNING_DISABLE_MSVC(4244)
1419QT_WARNING_DISABLE_MSVC(4275)
1420QT_WARNING_DISABLE_MSVC(4514)
1421QT_WARNING_DISABLE_MSVC(4800)
1422QT_WARNING_DISABLE_MSVC(4097)
1423QT_WARNING_DISABLE_MSVC(4706)
1424QT_WARNING_DISABLE_MSVC(4355)
1425QT_WARNING_DISABLE_MSVC(4710)
1426QT_WARNING_DISABLE_MSVC(4530)
1427# elif defined(Q_CC_BOR)
1428# pragma option -w-inl
1429# pragma option -w-aus
1438#if !defined(QT_NO_EXCEPTIONS)
1439# if !defined(Q_MOC_RUN)
1440# if defined(Q_CC_GNU
) && !defined(__cpp_exceptions
)
1441# define QT_NO_EXCEPTIONS
1443# elif defined(QT_BOOTSTRAPPED)
1444# define QT_NO_EXCEPTIONS
1449#if __cplusplus
>= 202002L
&& (!defined(_GLIBCXX_RELEASE
) || _GLIBCXX_RELEASE
>= 11
)
1450# define QT_COMPILER_HAS_LWG3346
1453#if defined(__cplusplus
) && __cplusplus
>= 202002L
1454# if !defined(Q_CC_MSVC_ONLY) || Q_CC_MSVC >= 1939
1457# define QT_COMPILER_HAS_P0846
1461#ifdef QT_COMPILER_HAS_P0846
1462# define QT_ENABLE_P0846_SEMANTICS_FOR(func)
1464 class QT_CLASS_JUST_FOR_P0846_SIMULATION;
1465# define QT_ENABLE_P0846_SEMANTICS_FOR(func)
1466 template <typename T>
1467 void func (QT_CLASS_JUST_FOR_P0846_SIMULATION *);
#define __has_include_next(x)
#define Q_NODISCARD_X(message)
#define Q_ASSUME_IMPL(expr)
#define Q_DECL_DEPRECATED_X(text)
#define Q_UNREACHABLE_IMPL()
#define __has_attribute(x)
#define Q_DECL_PURE_FUNCTION
#define Q_DECL_CONST_FUNCTION
#define QT_WARNING_DISABLE_DEPRECATED
#define Q_DECL_DEPRECATED
#define QT_DO_PRAGMA(text)
#define Q_DECL_COLD_FUNCTION
#define QT_WARNING_DISABLE_GCC(text)
#define QT_WARNING_DISABLE_INVALID_OFFSETOF
#define Q_DECL_UNUSED_MEMBER
#define Q_NODISCARD_CTOR_X(message)
#define Q_REQUIRED_RESULT
#define QT_WARNING_DISABLE_CLANG(text)
#define Q_DECL_EXPORT_OVERRIDABLE
#define __has_cpp_attribute(x)
#define QT_FT_MAX_GRAY_SPANS
static int gray_move_to(const QT_FT_Vector *to, PWorker worker)
static void gray_record_cell(RAS_ARG)
#define QT_FT_MEM_ZERO(dest, count)
#define ErrRaster_Memory_Overflow
static PCell gray_find_cell(RAS_ARG)
static void gray_raster_done(QT_FT_Raster raster)
static void gray_render_line(RAS_ARG_ TPos to_x, TPos to_y)
static int gray_convert_glyph_inner(RAS_ARG)
static void gray_start_cell(RAS_ARG_ TCoord ex, TCoord ey)
static void gray_split_conic(QT_FT_Vector *base)
#define ErrRaster_Invalid_Argument
static int gray_raster_new(QT_FT_Raster *araster)
static int QT_FT_Outline_Decompose(const QT_FT_Outline *outline, void *user)
#define QT_FT_DIV_MOD(type, dividend, divisor, quotient, remainder)
#define QT_FT_HYPOT(x, y)
static void gray_render_cubic(RAS_ARG_ const QT_FT_Vector *control1, const QT_FT_Vector *control2, const QT_FT_Vector *to)
static int gray_convert_glyph(RAS_ARG)
#define QT_FT_ERR_XCAT(x, y)
static int gray_raster_render(QT_FT_Raster raster, const QT_FT_Raster_Params *params)
#define ErrRaster_Invalid_Mode
static void gray_raster_reset(QT_FT_Raster raster, char *pool_base, long pool_size)
int q_gray_rendered_spans(TRaster *raster)
static void gray_compute_cbox(RAS_ARG)
static void gray_set_cell(RAS_ARG_ TCoord ex, TCoord ey)
#define ErrRaster_OutOfMemory
const QT_FT_Raster_Funcs qt_ft_grays_raster
#define QT_FT_ERR_CAT(x, y)
#define QT_FT_MEM_SET(d, s, c)
static void gray_init_cells(RAS_ARG_ void *buffer, long byte_size)
static void gray_render_conic(RAS_ARG_ const QT_FT_Vector *control, const QT_FT_Vector *to)
static void gray_sweep(RAS_ARG_ const QT_FT_Bitmap *target)
static void gray_render_scanline(RAS_ARG_ TCoord ey, TPos x1, TCoord y1, TPos x2, TCoord y2)
static void gray_render_span(int count, const QT_FT_Span *spans, PWorker worker)
#define ErrRaster_Invalid_Outline
static void gray_split_cubic(QT_FT_Vector *base)
static void gray_hline(RAS_ARG_ TCoord x, TCoord y, TPos area, int acount)
#define __has_extension(X)
long buffer_allocated_size
qt_ft_jmp_buf jump_buffer
QT_FT_Raster_Span_Func render_span
QT_FT_Span gray_spans[QT_FT_MAX_GRAY_SPANS]