diff options
Diffstat (limited to 'src/corelib/global/qtypes.h')
-rw-r--r-- | src/corelib/global/qtypes.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/global/qtypes.h b/src/corelib/global/qtypes.h index fa41f03c44..d08a919c13 100644 --- a/src/corelib/global/qtypes.h +++ b/src/corelib/global/qtypes.h @@ -11,6 +11,8 @@ #ifdef __cplusplus # include <cstddef> # include <cstdint> +#else +# include <assert.h> #endif #if 0 @@ -58,7 +60,7 @@ typedef quint64 qulonglong; #ifndef __cplusplus // In C++ mode, we define below using QIntegerForSize template -Q_STATIC_ASSERT_X(sizeof(ptrdiff_t) == sizeof(size_t), "Weird ptrdiff_t and size_t definitions"); +static_assert(sizeof(ptrdiff_t) == sizeof(size_t), "Weird ptrdiff_t and size_t definitions"); typedef ptrdiff_t qptrdiff; typedef ptrdiff_t qsizetype; typedef ptrdiff_t qintptr; |