#endif
void constCorrectness();
void customDeleter();
+#ifdef Q_COMPILER_LAMBDA
void lambdaCustomDeleter();
+#endif
void creating();
void creatingQObject();
void mixTrackingPointerCode();
safetyCheck();
}
+#ifdef Q_COMPILER_LAMBDA
+// The compiler needs to be in C++11 mode and to support lambdas
void tst_QSharedPointer::lambdaCustomDeleter()
{
-#ifndef Q_COMPILER_LAMBDA
- QSKIP("This compiler is not in C++11 mode or does not support lambdas");
-#else
{
// stateless, one-argument
QSharedPointer<Data> ptr(new Data, [](Data *d) { delete d; });
QCOMPARE(i, 42);
}
safetyCheck();
-#endif
}
+#endif
void customQObjectDeleterFn(QObject *obj)
{