diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-11-16 03:06:10 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-11-18 09:38:09 +0100 |
commit | 29942dcbb1ecd7a9ffd60347221df13c5529b9fc (patch) | |
tree | 1b00e30f873cb4fcc383dfbdb057c41b1bba25e2 /src/corelib/global | |
parent | befa3729db0d1010694bd1bb4cbadd36ff5c49fb (diff) |
Centralize the wchar_t == char16_t check on Windows
Don't push it onto every TU that includes QChar (... approx.
everything that uses Qt).
Change-Id: I4a07ce9e38a347b45315db93b0c5b90c20bacdbc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qglobal.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index ad17f41236..a1a27376e7 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -132,6 +132,9 @@ static_assert(QT_POINTER_SIZE == sizeof(void *), "QT_POINTER_SIZE defined incorr static_assert(sizeof(float) == 4, "Qt assumes that float is 32 bits"); static_assert(sizeof(char16_t) == 2, "Qt assumes that char16_t is 16 bits"); static_assert(sizeof(char32_t) == 4, "Qt assumes that char32_t is 32 bits"); +#if defined(Q_OS_WIN) +static_assert(sizeof(wchar_t) == sizeof(char16_t)); +#endif static_assert(std::numeric_limits<int>::radix == 2, "Qt assumes binary integers"); static_assert((std::numeric_limits<int>::max() + std::numeric_limits<int>::lowest()) == -1, |