From b22ef5966360b36d17cc38df16927d1637f05d08 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 3 Mar 2014 11:57:20 +0100 Subject: 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' 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) before the static assert. Task-number: QTBUG-37195 Change-Id: Ib2b60f3c1ffeb0b8bdeb1fb0c659655ce4ab10d8 Reviewed-by: Thiago Macieira --- tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib/thread/qatomicinteger/tst_qatomicinteger.cpp') 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 inline void booleanHelper() { } -template struct TypeInStruct { T type; }; +struct TypeInStruct { TEST_TYPE type; }; void tst_QAtomicIntegerXX::static_checks() { Q_STATIC_ASSERT(sizeof(QAtomicInteger) == sizeof(T)); - Q_STATIC_ASSERT(Q_ALIGNOF(QAtomicInteger) == Q_ALIGNOF(TypeInStruct)); + Q_STATIC_ASSERT(Q_ALIGNOF(QAtomicInteger) == Q_ALIGNOF(TypeInStruct)); // statements with no effect (void) QAtomicInteger::isReferenceCountingNative(); -- cgit v1.2.3