7#include <QtCore/qcompilerdetection.h>
8#include <QtCore/qsystemdetection.h>
9#include <QtCore/qprocessordetection.h>
459static_assert(UCHAR_MAX == 255,
"Qt assumes that char is 8 bits");
460static_assert(
sizeof(int) == 4,
"Qt assumes that int is 32 bits");
461static_assert(
QT_POINTER_SIZE ==
sizeof(
void *),
"QT_POINTER_SIZE defined incorrectly");
462static_assert(
sizeof(float) == 4,
"Qt assumes that float is 32 bits");
463static_assert(
sizeof(char16_t) == 2,
"Qt assumes that char16_t is 16 bits");
464static_assert(
sizeof(char32_t) == 4,
"Qt assumes that char32_t is 32 bits");
466static_assert(
sizeof(wchar_t) ==
sizeof(
char16_t));
468static_assert(std::numeric_limits<int>::radix == 2,
469 "Qt assumes binary integers");
470static_assert((std::numeric_limits<int>::max() + std::numeric_limits<int>::lowest()) == -1,
471 "Qt assumes two's complement integers");
472static_assert(
sizeof(wchar_t) ==
sizeof(
char32_t) ||
sizeof(wchar_t) ==
sizeof(
char16_t),
473 "Qt assumes wchar_t is compatible with either char32_t or char16_t");
482#if !defined(Q_CC_GHS)
483static_assert(std::numeric_limits<float>::is_iec559,
484 "Qt assumes IEEE 754 floating point");
489static_assert(std::numeric_limits<float>::has_infinity &&
490 std::numeric_limits<float>::has_quiet_NaN,
491 "Qt assumes IEEE 754 floating point");
497static_assert(std::numeric_limits<float>::radix == 2,
498 "Qt assumes binary IEEE 754 floating point");
501static_assert(
sizeof(size_t) ==
sizeof(
void *),
"size_t and a pointer don't have the same size");
502static_assert(
sizeof(size_t) ==
sizeof(
qsizetype));
503static_assert((std::is_same<qsizetype, qptrdiff>::value));
504static_assert(std::is_same_v<std::size_t, size_t>);
507static_assert(
sizeof(
qint8) == 1,
"Internal error, qint8 is misdefined");
508static_assert(
sizeof(
qint16)== 2,
"Internal error, qint16 is misdefined");
509static_assert(
sizeof(
qint32) == 4,
"Internal error, qint32 is misdefined");
510static_assert(
sizeof(
qint64) == 8,
"Internal error, qint64 is misdefined");
511#ifdef QT_SUPPORTS_INT128
512static_assert(
sizeof(qint128) == 16,
"Internal error, qint128 is misdefined");
515#ifdef QT_SUPPORTS_INT128
523# if defined(_LIBCPP_VERSION) || (defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE >= 11)
524static_assert(std::numeric_limits<quint128>::max() == Q_UINT128_MAX);
Combined button and popup list for selecting options.
QT_BEGIN_NAMESPACE typedef signed char qint8