summaryrefslogtreecommitdiffstats
path: root/src/corelib/concurrent/qtconcurrentcompilertest.h
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-04-18 12:07:32 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-19 13:09:31 (GMT)
commit917f2ff617209bcc283eb3590b422bcf239c0537 (patch)
tree8a58ff1f428c85546303864eea7229c8e341cbe9 /src/corelib/concurrent/qtconcurrentcompilertest.h
parent837f18f043b18410c1d93b9f1156acf729dad510 (diff)
downloadQt-917f2ff617209bcc283eb3590b422bcf239c0537.zip
Qt-917f2ff617209bcc283eb3590b422bcf239c0537.tar.gz
Qt-917f2ff617209bcc283eb3590b422bcf239c0537.tar.bz2
Support of lambdas in QtConcurrent::run
Reviewed-by: Joao
Diffstat (limited to 'src/corelib/concurrent/qtconcurrentcompilertest.h')
-rw-r--r--src/corelib/concurrent/qtconcurrentcompilertest.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/corelib/concurrent/qtconcurrentcompilertest.h b/src/corelib/concurrent/qtconcurrentcompilertest.h
index fad0c35..86f01b3 100644
--- a/src/corelib/concurrent/qtconcurrentcompilertest.h
+++ b/src/corelib/concurrent/qtconcurrentcompilertest.h
@@ -57,6 +57,20 @@ QT_MODULE(Core)
# define QT_TYPENAME typename
#endif
+namespace QtPrivate {
+
+template<class T>
+class HasResultType {
+ typedef char Yes;
+ typedef void *No;
+ template<typename U> static Yes test(int, const typename U::result_type * = 0);
+ template<typename U> static No test(double);
+public:
+ enum { Value = (sizeof(test<T>(0)) == sizeof(Yes)) };
+};
+
+}
+
QT_END_NAMESPACE
QT_END_HEADER