diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-03-03 11:57:20 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-04 15:59:05 +0100 |
commit | b22ef5966360b36d17cc38df16927d1637f05d08 (patch) | |
tree | 5fd8c3701bba006c0c632ac851c55fd19716342d /tests | |
parent | f0d411cfbbfd463819e5456ec8ab695e990b56e4 (diff) |
Remove use of templates in tst_qatomicinteger.
MSVC 2008 is confused by TypeInStruct being a template, resulting in
\tst_qatomicinteger.cpp(189) : error C2027: use of undefined type 'QStaticAssertFailure<Test>'
with
[
Test=false
]
for int (and thus for all unsupported types). This appears to be a real
Heisenbug-nature compiler bug as it can also be fixed by adding
qDebug() << Q_ALIGNOF(TypeInStruct<T>)
before the static assert.
Task-number: QTBUG-37195
Change-Id: Ib2b60f3c1ffeb0b8bdeb1fb0c659655ce4ab10d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp b/tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp index 6ddd2ff233..6f8dc13325 100644 --- a/tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp +++ b/tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp @@ -181,12 +181,12 @@ private Q_SLOTS: }; template <bool> inline void booleanHelper() { } -template <typename T> struct TypeInStruct { T type; }; +struct TypeInStruct { TEST_TYPE type; }; void tst_QAtomicIntegerXX::static_checks() { Q_STATIC_ASSERT(sizeof(QAtomicInteger<T>) == sizeof(T)); - Q_STATIC_ASSERT(Q_ALIGNOF(QAtomicInteger<T>) == Q_ALIGNOF(TypeInStruct<T>)); + Q_STATIC_ASSERT(Q_ALIGNOF(QAtomicInteger<T>) == Q_ALIGNOF(TypeInStruct)); // statements with no effect (void) QAtomicInteger<T>::isReferenceCountingNative(); |