QtGlobal: check the Qt fixed size integers
"Just in case", together with all the others platform checks we have in qglobal.cpp, check that we're not accidentally breaking our type aliases for fixed size integers. Change-Id: Iaa9438741b3a7e89f3c458763c7d222ef2abe961 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
22e967c304
commit
b5e9130c44
@ -173,6 +173,12 @@ static_assert(sizeof(size_t) == sizeof(void *), "size_t and a pointer don't have
|
||||
static_assert(sizeof(size_t) == sizeof(qsizetype)); // implied by the definition
|
||||
static_assert((std::is_same<qsizetype, qptrdiff>::value));
|
||||
|
||||
// Check that our own typedefs are not broken.
|
||||
static_assert(sizeof(qint8) == 1, "Internal error, qint8 is misdefined");
|
||||
static_assert(sizeof(qint16)== 2, "Internal error, qint16 is misdefined");
|
||||
static_assert(sizeof(qint32) == 4, "Internal error, qint32 is misdefined");
|
||||
static_assert(sizeof(qint64) == 8, "Internal error, qint64 is misdefined");
|
||||
|
||||
/*!
|
||||
\class QFlag
|
||||
\inmodule QtCore
|
||||
|
Loading…
x
Reference in New Issue
Block a user