summaryrefslogtreecommitdiffstats
path: root/src/concurrent
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-02-24 19:57:17 +0100
committerLiang Qi <liang.qi@qt.io>2017-02-24 20:01:42 +0100
commitde49839df8abfba1f3ed3c36ef3177e4a9d6ef00 (patch)
tree71e777ca1e33c58edd9149821e970495ef4b75b2 /src/concurrent
parente6234535929c67e7fbfa1ad7ce88f37df0b68d45 (diff)
parent4d3781b640e8fb0a04e96b2d05199247556b8d86 (diff)
Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts: mkspecs/features/moc.prf Change-Id: Ia71c8e3b3185f7c999bf226d0675051b10b8740b
Diffstat (limited to 'src/concurrent')
-rw-r--r--src/concurrent/qtconcurrentfunctionwrappers.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/src/concurrent/qtconcurrentfunctionwrappers.h b/src/concurrent/qtconcurrentfunctionwrappers.h
index a08be69123..111933410b 100644
--- a/src/concurrent/qtconcurrentfunctionwrappers.h
+++ b/src/concurrent/qtconcurrentfunctionwrappers.h
@@ -192,6 +192,32 @@ QtConcurrent::ConstMemberFunctionWrapper<T, C> createFunctionWrapper(T (C::*func
return QtConcurrent::ConstMemberFunctionWrapper<T, C>(func);
}
+#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510
+template <typename T, typename U>
+QtConcurrent::FunctionWrapper1<T, U> createFunctionWrapper(T (*func)(U) noexcept)
+{
+ return QtConcurrent::FunctionWrapper1<T, U>(func);
+}
+
+template <typename T, typename C>
+QtConcurrent::MemberFunctionWrapper<T, C> createFunctionWrapper(T (C::*func)() noexcept)
+{
+ return QtConcurrent::MemberFunctionWrapper<T, C>(func);
+}
+
+template <typename T, typename C, typename U>
+QtConcurrent::MemberFunctionWrapper1<T, C, U> createFunctionWrapper(T (C::*func)(U) noexcept)
+{
+ return QtConcurrent::MemberFunctionWrapper1<T, C, U>(func);
+}
+
+template <typename T, typename C>
+QtConcurrent::ConstMemberFunctionWrapper<T, C> createFunctionWrapper(T (C::*func)() const noexcept)
+{
+ return QtConcurrent::ConstMemberFunctionWrapper<T, C>(func);
+}
+#endif
+
struct PushBackWrapper
{
typedef void result_type;
@@ -231,6 +257,20 @@ struct ReduceResultType<T(C::*)(U)>
typedef C ResultType;
};
+#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510
+template <class U, class V>
+struct ReduceResultType<void(*)(U&,V) noexcept>
+{
+ typedef U ResultType;
+};
+
+template <class T, class C, class U>
+struct ReduceResultType<T(C::*)(U) noexcept>
+{
+ typedef C ResultType;
+};
+#endif
+
template <class InputSequence, class MapFunctor>
struct MapResultType
{
@@ -249,6 +289,20 @@ struct MapResultType<void, T(C::*)() const>
typedef T ResultType;
};
+#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510
+template <class U, class V>
+struct MapResultType<void, U (*)(V) noexcept>
+{
+ typedef U ResultType;
+};
+
+template <class T, class C>
+struct MapResultType<void, T(C::*)() const noexcept>
+{
+ typedef T ResultType;
+};
+#endif
+
#ifndef QT_NO_TEMPLATE_TEMPLATE_PARAMETERS
template <template <typename> class InputSequence, typename MapFunctor, typename T>
@@ -269,6 +323,21 @@ struct MapResultType<InputSequence<T>, U(C::*)() const>
typedef InputSequence<U> ResultType;
};
+#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510
+
+template <template <typename> class InputSequence, class T, class U, class V>
+struct MapResultType<InputSequence<T>, U (*)(V) noexcept>
+{
+ typedef InputSequence<U> ResultType;
+};
+
+template <template <typename> class InputSequence, class T, class U, class C>
+struct MapResultType<InputSequence<T>, U(C::*)() const noexcept>
+{
+ typedef InputSequence<U> ResultType;
+};
+#endif
+
#endif // QT_NO_TEMPLATE_TEMPLATE_PARAMETER
template <class MapFunctor>
@@ -289,6 +358,21 @@ struct MapResultType<QStringList, U(C::*)() const>
typedef QList<U> ResultType;
};
+#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510
+
+template <class U, class V>
+struct MapResultType<QStringList, U (*)(V) noexcept>
+{
+ typedef QList<U> ResultType;
+};
+
+template <class U, class C>
+struct MapResultType<QStringList, U(C::*)() const noexcept>
+{
+ typedef QList<U> ResultType;
+};
+#endif
+
} // namespace QtPrivate.
#endif //Q_QDOC