From 32c942ce856572093b0fef2e79b30a80fe8db23e Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 8 Jan 2018 12:36:22 +0100 Subject: [PATCH] doc: Move use of Q_CLANG_QDOC that caused compile-time assert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It caused a compile-time assert in clang that should not have occurred. It is now moved passed the assert macro. Change-Id: I8311992617de7837ca4604fcc3e5afb17dcda65d Reviewed-by: Topi Reiniƶ --- src/corelib/tools/qchar.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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