diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-08-06 18:15:49 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-18 18:35:50 +0200 |
commit | c9bfd34fa00eb349f6fc37cbea58b71d96a05138 (patch) | |
tree | 6f6fab4d7a41ed04e48d98783d3bb0bb47e7bac7 /tests | |
parent | 2b00f97ab05f144293b26d1e0d8cf4c54d222f92 (diff) |
Enable QAtomicInteger for char16_t and char32_t
Those are regular, integer types, of 16- and 32-bit width,
respectively. C++11's std::atomic supports them, so we should too.
C++11 also supports wchar_t, but since that type's size can change, I
don't feel like support for it in Qt is pressing.
Change-Id: I945b641c91a8a98be82715f878c382dee58ac98b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp b/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp index 1283083f0e..fbabb115a1 100644 --- a/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp +++ b/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp @@ -190,6 +190,10 @@ void tst_QAtomicInt::warningFreeHelper() warningFreeHelperTemplate<unsigned int, QBasicAtomicInteger<unsigned int> >(); constexprFunctionsHelperTemplate<QBasicAtomicInteger<int> >(); constexprFunctionsHelperTemplate<QBasicAtomicInteger<unsigned int> >(); +# ifdef Q_COMPILER_UNICODE_STRINGS + warningFreeHelperTemplate<qint16, QBasicAtomicInteger<char32_t> >(); + constexprFunctionsHelperTemplate<QBasicAtomicInteger<char32_t> >(); +# endif #endif #ifdef Q_ATOMIC_INT16_IS_SUPPORTED @@ -197,6 +201,10 @@ void tst_QAtomicInt::warningFreeHelper() warningFreeHelperTemplate<quint16, QBasicAtomicInteger<quint16> >(); constexprFunctionsHelperTemplate<QBasicAtomicInteger<qint16> >(); constexprFunctionsHelperTemplate<QBasicAtomicInteger<quint16> >(); +# ifdef Q_COMPILER_UNICODE_STRINGS + warningFreeHelperTemplate<qint16, QBasicAtomicInteger<char16_t> >(); + constexprFunctionsHelperTemplate<QBasicAtomicInteger<char16_t> >(); +# endif #endif #ifdef Q_ATOMIC_INT8_IS_SUPPORTED |