diff --git a/src/corelib/tools/qchar.h b/src/corelib/tools/qchar.h index a0c82dba05..84df8accc5 100644 --- a/src/corelib/tools/qchar.h +++ b/src/corelib/tools/qchar.h @@ -89,8 +89,10 @@ public: #if defined(Q_COMPILER_UNICODE_STRINGS) Q_DECL_CONSTEXPR QChar(char16_t ch) Q_DECL_NOTHROW : ucs(ushort(ch)) {} // implicit #endif -#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC) +#if defined(Q_OS_WIN) Q_STATIC_ASSERT(sizeof(wchar_t) == sizeof(ushort)); +#endif +#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC) Q_DECL_CONSTEXPR QChar(wchar_t ch) Q_DECL_NOTHROW : ucs(ushort(ch)) {} // implicit #endif