diff --git a/src/concurrent/qtconcurrentfunctionwrappers.h b/src/concurrent/qtconcurrentfunctionwrappers.h index a08be691237..111933410bc 100644 --- a/src/concurrent/qtconcurrentfunctionwrappers.h +++ b/src/concurrent/qtconcurrentfunctionwrappers.h @@ -192,6 +192,32 @@ QtConcurrent::ConstMemberFunctionWrapper createFunctionWrapper(T (C::*func return QtConcurrent::ConstMemberFunctionWrapper(func); } +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +QtConcurrent::FunctionWrapper1 createFunctionWrapper(T (*func)(U) noexcept) +{ + return QtConcurrent::FunctionWrapper1(func); +} + +template +QtConcurrent::MemberFunctionWrapper createFunctionWrapper(T (C::*func)() noexcept) +{ + return QtConcurrent::MemberFunctionWrapper(func); +} + +template +QtConcurrent::MemberFunctionWrapper1 createFunctionWrapper(T (C::*func)(U) noexcept) +{ + return QtConcurrent::MemberFunctionWrapper1(func); +} + +template +QtConcurrent::ConstMemberFunctionWrapper createFunctionWrapper(T (C::*func)() const noexcept) +{ + return QtConcurrent::ConstMemberFunctionWrapper(func); +} +#endif + struct PushBackWrapper { typedef void result_type; @@ -231,6 +257,20 @@ struct ReduceResultType typedef C ResultType; }; +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +struct ReduceResultType +{ + typedef U ResultType; +}; + +template +struct ReduceResultType +{ + typedef C ResultType; +}; +#endif + template struct MapResultType { @@ -249,6 +289,20 @@ struct MapResultType typedef T ResultType; }; +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +struct MapResultType +{ + typedef U ResultType; +}; + +template +struct MapResultType +{ + typedef T ResultType; +}; +#endif + #ifndef QT_NO_TEMPLATE_TEMPLATE_PARAMETERS template