From 8e83d6150121412b9f493ff525bce6f09d105463 Mon Sep 17 00:00:00 2001 From: Eric Lemanissier Date: Tue, 28 Mar 2017 08:48:46 +0200 Subject: [PATCH] Adapt to the C++ SIC introduced by P0012: noexcept specialization complements commit c5e687895dd2eba3106f697b6e92b84683402403 added missing noexcept (void)StoredMemberFunctionCall specialization to disambiguate template selection. Without these specializations, StoredFunctorPointerCall was a better match, which led to compilation failure Task-number: QTBUG-58142 Change-Id: Ibd41057d9a497f057a895d73277902e90300ed7a Reviewed-by: Allan Sandfeld Jensen --- src/concurrent/qtconcurrentrun.h | 311 ++++++ .../qtconcurrentstoredfunctioncall.h | 953 ++++++++++++++++++ 2 files changed, 1264 insertions(+) diff --git a/src/concurrent/qtconcurrentrun.h b/src/concurrent/qtconcurrentrun.h index 8e7c495a0fd..c0c0e66913a 100644 --- a/src/concurrent/qtconcurrentrun.h +++ b/src/concurrent/qtconcurrentrun.h @@ -606,6 +606,317 @@ QFuture run(QThreadPool *pool, const Class *object, T (Class::*fn)(Param1, Pa return (new typename SelectStoredConstMemberFunctionPointerCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(pool); } +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +QFuture run(T (*functionPointer)() noexcept) +{ + return (new StoredFunctorCall0(functionPointer))->start(); +} +template +QFuture run(T (*functionPointer)(Param1) noexcept, const Arg1 &arg1) +{ + return (new StoredFunctorCall1(functionPointer, arg1))->start(); +} +template +QFuture run(T (*functionPointer)(Param1, Param2) noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new StoredFunctorCall2(functionPointer, arg1, arg2))->start(); +} +template +QFuture run(T (*functionPointer)(Param1, Param2, Param3) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new StoredFunctorCall3(functionPointer, arg1, arg2, arg3))->start(); +} +template +QFuture run(T (*functionPointer)(Param1, Param2, Param3, Param4) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new StoredFunctorCall4(functionPointer, arg1, arg2, arg3, arg4))->start(); +} +template +QFuture run(T (*functionPointer)(Param1, Param2, Param3, Param4, Param5) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new StoredFunctorCall5(functionPointer, arg1, arg2, arg3, arg4, arg5))->start(); +} + +template +QFuture run(const Class &object, T (Class::*fn)() noexcept) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall0::type(fn, object))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1) noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall1::type(fn, object, arg1))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2) noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall2::type(fn, object, arg1, arg2))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2, Param3) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall3::type(fn, object, arg1, arg2, arg3))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(); +} + +template +QFuture run(const Class &object, T (Class::*fn)() const noexcept) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall0::type(fn, object))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1) const noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall1::type(fn, object, arg1))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2) const noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall2::type(fn, object, arg1, arg2))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2, Param3) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall3::type(fn, object, arg1, arg2, arg3))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(); +} +template +QFuture run(const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(); +} + +template +QFuture run(Class *object, T (Class::*fn)() noexcept) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall0::type(fn, object))->start(); +} +template +QFuture run(Class *object, T (Class::*fn)(Param1) noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall1::type(fn, object, arg1))->start(); +} +template +QFuture run(Class *object, T (Class::*fn)(Param1, Param2) noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall2::type(fn, object, arg1, arg2))->start(); +} +template +QFuture run(Class *object, T (Class::*fn)(Param1, Param2, Param3) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall3::type(fn, object, arg1, arg2, arg3))->start(); +} +template +QFuture run(Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(); +} +template +QFuture run(Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(); +} + +template +QFuture run(const Class *object, T (Class::*fn)() const noexcept) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall0::type(fn, object))->start(); +} +template +QFuture run(const Class *object, T (Class::*fn)(Param1) const noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall1::type(fn, object, arg1))->start(); +} +template +QFuture run(const Class *object, T (Class::*fn)(Param1, Param2) const noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall2::type(fn, object, arg1, arg2))->start(); +} +template +QFuture run(const Class *object, T (Class::*fn)(Param1, Param2, Param3) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall3::type(fn, object, arg1, arg2, arg3))->start(); +} +template +QFuture run(const Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(); +} +template +QFuture run(const Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(); +} +template +QFuture run(QThreadPool *pool, T (*functionPointer)() noexcept) +{ + return (new StoredFunctorCall0(functionPointer))->start(pool); +} +template +QFuture run(QThreadPool *pool, T (*functionPointer)(Param1) noexcept, const Arg1 &arg1) +{ + return (new StoredFunctorCall1(functionPointer, arg1))->start(pool); +} +template +QFuture run(QThreadPool *pool, T (*functionPointer)(Param1, Param2) noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new StoredFunctorCall2(functionPointer, arg1, arg2))->start(pool); +} +template +QFuture run(QThreadPool *pool, T (*functionPointer)(Param1, Param2, Param3) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new StoredFunctorCall3(functionPointer, arg1, arg2, arg3))->start(pool); +} +template +QFuture run(QThreadPool *pool, T (*functionPointer)(Param1, Param2, Param3, Param4) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new StoredFunctorCall4(functionPointer, arg1, arg2, arg3, arg4))->start(pool); +} +template +QFuture run(QThreadPool *pool, T (*functionPointer)(Param1, Param2, Param3, Param4, Param5) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new StoredFunctorCall5(functionPointer, arg1, arg2, arg3, arg4, arg5))->start(pool); +} + +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)() noexcept) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall0::type(fn, object))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1) noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall1::type(fn, object, arg1))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2) noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall2::type(fn, object, arg1, arg2))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2, Param3) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall3::type(fn, object, arg1, arg2, arg3))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredNoExceptMemberFunctionCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(pool); +} + +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)() const noexcept) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall0::type(fn, object))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1) const noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall1::type(fn, object, arg1))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2) const noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall2::type(fn, object, arg1, arg2))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2, Param3) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall3::type(fn, object, arg1, arg2, arg3))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class &object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(pool); +} + +template +QFuture run(QThreadPool *pool, Class *object, T (Class::*fn)() noexcept) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall0::type(fn, object))->start(pool); +} +template +QFuture run(QThreadPool *pool, Class *object, T (Class::*fn)(Param1) noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall1::type(fn, object, arg1))->start(pool); +} +template +QFuture run(QThreadPool *pool, Class *object, T (Class::*fn)(Param1, Param2) noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall2::type(fn, object, arg1, arg2))->start(pool); +} +template +QFuture run(QThreadPool *pool, Class *object, T (Class::*fn)(Param1, Param2, Param3) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall3::type(fn, object, arg1, arg2, arg3))->start(pool); +} +template +QFuture run(QThreadPool *pool, Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(pool); +} +template +QFuture run(QThreadPool *pool, Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredNoExceptMemberFunctionPointerCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(pool); +} + +template +QFuture run(QThreadPool *pool, const Class *object, T (Class::*fn)() const noexcept) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall0::type(fn, object))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class *object, T (Class::*fn)(Param1) const noexcept, const Arg1 &arg1) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall1::type(fn, object, arg1))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class *object, T (Class::*fn)(Param1, Param2) const noexcept, const Arg1 &arg1, const Arg2 &arg2) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall2::type(fn, object, arg1, arg2))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class *object, T (Class::*fn)(Param1, Param2, Param3) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall3::type(fn, object, arg1, arg2, arg3))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall4::type(fn, object, arg1, arg2, arg3, arg4))->start(pool); +} +template +QFuture run(QThreadPool *pool, const Class *object, T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, const Arg1 &arg1, const Arg2 &arg2, const Arg3 &arg3, const Arg4 &arg4, const Arg5 &arg5) +{ + return (new typename SelectStoredConstNoExceptMemberFunctionPointerCall5::type(fn, object, arg1, arg2, arg3, arg4, arg5))->start(pool); +} +#endif + } //namespace QtConcurrent #endif // Q_QDOC diff --git a/src/concurrent/qtconcurrentstoredfunctioncall.h b/src/concurrent/qtconcurrentstoredfunctioncall.h index eba6a1aad08..32a0214a88d 100644 --- a/src/concurrent/qtconcurrentstoredfunctioncall.h +++ b/src/concurrent/qtconcurrentstoredfunctioncall.h @@ -255,6 +255,165 @@ struct SelectStoredConstMemberFunctionPointerCall0 Type, VoidStoredConstMemberFunctionPointerCall0 >::type type; }; +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +class StoredNoExceptMemberFunctionCall0 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionCall0(T (Class::*_fn)() noexcept, const Class &_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + this->result = (object.*fn)(); + } +private: + T (Class::*fn)() noexcept; + Class object; + +}; +template +class VoidStoredNoExceptMemberFunctionCall0 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionCall0(T (Class::*_fn)() noexcept, const Class &_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + (object.*fn)(); + } +private: + T (Class::*fn)() noexcept; + Class object; + +}; +template +struct SelectStoredNoExceptMemberFunctionCall0 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionCall0 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionCall0 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionCall0(T (Class::*_fn)() const noexcept, const Class &_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + this->result = (object.*fn)(); + } +private: + T (Class::*fn)() const noexcept; + const Class object; + +}; +template +class VoidStoredConstNoExceptMemberFunctionCall0 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionCall0(T (Class::*_fn)() const noexcept, const Class &_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + (object.*fn)(); + } +private: + T (Class::*fn)() const noexcept; + const Class object; + +}; +template +struct SelectStoredConstNoExceptMemberFunctionCall0 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionCall0 >::type type; +}; +template +class StoredNoExceptMemberFunctionPointerCall0 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionPointerCall0(T (Class::*_fn)() noexcept, Class *_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + this->result = (object->*fn)(); + } +private: + T (Class::*fn)() noexcept; + Class *object; + +}; +template +class VoidStoredNoExceptMemberFunctionPointerCall0 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionPointerCall0(T (Class::*_fn)() noexcept, Class *_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + (object->*fn)(); + } +private: + T (Class::*fn)() noexcept; + Class *object; + +}; +template +struct SelectStoredNoExceptMemberFunctionPointerCall0 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionPointerCall0 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionPointerCall0 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionPointerCall0(T (Class::*_fn)() const noexcept, Class const *_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + this->result = (object->*fn)(); + } +private: + T (Class::*fn)() const noexcept; + Class const *object; + +}; +template +class VoidStoredConstNoExceptMemberFunctionPointerCall0 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionPointerCall0(T (Class::*_fn)() const noexcept, Class const *_object) + : fn(_fn), object(_object){ } + + void runFunctor() override + { + (object->*fn)(); + } +private: + T (Class::*fn)() const noexcept; + Class const *object; + +}; +template +struct SelectStoredConstNoExceptMemberFunctionPointerCall0 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionPointerCall0 >::type type; +}; +#endif + template struct StoredFunctorCall1: public RunFunctionTask { @@ -458,6 +617,165 @@ struct SelectStoredConstMemberFunctionPointerCall1 Type, VoidStoredConstMemberFunctionPointerCall1 >::type type; }; +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +class StoredNoExceptMemberFunctionCall1 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionCall1(T (Class::*_fn)(Param1) noexcept, const Class &_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1); + } +private: + T (Class::*fn)(Param1) noexcept; + Class object; + Arg1 arg1; +}; +template +class VoidStoredNoExceptMemberFunctionCall1 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionCall1(T (Class::*_fn)(Param1) noexcept, const Class &_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + (object.*fn)(arg1); + } +private: + T (Class::*fn)(Param1) noexcept; + Class object; + Arg1 arg1; +}; +template +struct SelectStoredNoExceptMemberFunctionCall1 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionCall1 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionCall1 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionCall1(T (Class::*_fn)(Param1) const noexcept, const Class &_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1); + } +private: + T (Class::*fn)(Param1) const noexcept; + const Class object; + Arg1 arg1; +}; +template +class VoidStoredConstNoExceptMemberFunctionCall1 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionCall1(T (Class::*_fn)(Param1) const noexcept, const Class &_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + (object.*fn)(arg1); + } +private: + T (Class::*fn)(Param1) const noexcept; + const Class object; + Arg1 arg1; +}; +template +struct SelectStoredConstNoExceptMemberFunctionCall1 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionCall1 >::type type; +}; +template +class StoredNoExceptMemberFunctionPointerCall1 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionPointerCall1(T (Class::*_fn)(Param1) noexcept, Class *_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1); + } +private: + T (Class::*fn)(Param1) noexcept; + Class *object; + Arg1 arg1; +}; +template +class VoidStoredNoExceptMemberFunctionPointerCall1 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionPointerCall1(T (Class::*_fn)(Param1) noexcept, Class *_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + (object->*fn)(arg1); + } +private: + T (Class::*fn)(Param1) noexcept; + Class *object; + Arg1 arg1; +}; +template +struct SelectStoredNoExceptMemberFunctionPointerCall1 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionPointerCall1 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionPointerCall1 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionPointerCall1(T (Class::*_fn)(Param1) const noexcept, Class const *_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1); + } +private: + T (Class::*fn)(Param1) const noexcept; + Class const *object; + Arg1 arg1; +}; +template +class VoidStoredConstNoExceptMemberFunctionPointerCall1 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionPointerCall1(T (Class::*_fn)(Param1) const noexcept, Class const *_object, const Arg1 &_arg1) + : fn(_fn), object(_object), arg1(_arg1){ } + + void runFunctor() override + { + (object->*fn)(arg1); + } +private: + T (Class::*fn)(Param1) const noexcept; + Class const *object; + Arg1 arg1; +}; +template +struct SelectStoredConstNoExceptMemberFunctionPointerCall1 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionPointerCall1 >::type type; +}; +#endif + template struct StoredFunctorCall2: public RunFunctionTask { @@ -661,6 +979,165 @@ struct SelectStoredConstMemberFunctionPointerCall2 Type, VoidStoredConstMemberFunctionPointerCall2 >::type type; }; +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +class StoredNoExceptMemberFunctionCall2 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; +}; +template +class VoidStoredNoExceptMemberFunctionCall2 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; +}; +template +struct SelectStoredNoExceptMemberFunctionCall2 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionCall2 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionCall2 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; +}; +template +class VoidStoredConstNoExceptMemberFunctionCall2 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionCall2(T (Class::*_fn)(Param1, Param2) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; +}; +template +struct SelectStoredConstNoExceptMemberFunctionCall2 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionCall2 >::type type; +}; +template +class StoredNoExceptMemberFunctionPointerCall2 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; +}; +template +class VoidStoredNoExceptMemberFunctionPointerCall2 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; +}; +template +struct SelectStoredNoExceptMemberFunctionPointerCall2 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionPointerCall2 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionPointerCall2 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) const noexcept; + Class const *object; + Arg1 arg1; Arg2 arg2; +}; +template +class VoidStoredConstNoExceptMemberFunctionPointerCall2 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionPointerCall2(T (Class::*_fn)(Param1, Param2) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2); + } +private: + T (Class::*fn)(Param1, Param2) const noexcept; + Class const *object; + Arg1 arg1; Arg2 arg2; +}; +template +struct SelectStoredConstNoExceptMemberFunctionPointerCall2 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionPointerCall2 >::type type; +}; +#endif + template struct StoredFunctorCall3: public RunFunctionTask { @@ -864,6 +1341,165 @@ struct SelectStoredConstMemberFunctionPointerCall3 Type, VoidStoredConstMemberFunctionPointerCall3 >::type type; }; +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +class StoredNoExceptMemberFunctionCall3 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +class VoidStoredNoExceptMemberFunctionCall3 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +struct SelectStoredNoExceptMemberFunctionCall3 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionCall3 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionCall3 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +class VoidStoredConstNoExceptMemberFunctionCall3 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionCall3(T (Class::*_fn)(Param1, Param2, Param3) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +struct SelectStoredConstNoExceptMemberFunctionCall3 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionCall3 >::type type; +}; +template +class StoredNoExceptMemberFunctionPointerCall3 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +class VoidStoredNoExceptMemberFunctionPointerCall3 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +struct SelectStoredNoExceptMemberFunctionPointerCall3 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionPointerCall3 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionPointerCall3 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) const noexcept; + Class const *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +class VoidStoredConstNoExceptMemberFunctionPointerCall3 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionPointerCall3(T (Class::*_fn)(Param1, Param2, Param3) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2, arg3); + } +private: + T (Class::*fn)(Param1, Param2, Param3) const noexcept; + Class const *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; +}; +template +struct SelectStoredConstNoExceptMemberFunctionPointerCall3 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionPointerCall3 >::type type; +}; +#endif + template struct StoredFunctorCall4: public RunFunctionTask { @@ -1067,6 +1703,165 @@ struct SelectStoredConstMemberFunctionPointerCall4 Type, VoidStoredConstMemberFunctionPointerCall4 >::type type; }; +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +class StoredNoExceptMemberFunctionCall4 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +class VoidStoredNoExceptMemberFunctionCall4 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +struct SelectStoredNoExceptMemberFunctionCall4 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionCall4 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionCall4 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +class VoidStoredConstNoExceptMemberFunctionCall4 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +struct SelectStoredConstNoExceptMemberFunctionCall4 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionCall4 >::type type; +}; +template +class StoredNoExceptMemberFunctionPointerCall4 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +class VoidStoredNoExceptMemberFunctionPointerCall4 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +struct SelectStoredNoExceptMemberFunctionPointerCall4 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionPointerCall4 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionPointerCall4 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept; + Class const *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +class VoidStoredConstNoExceptMemberFunctionPointerCall4 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionPointerCall4(T (Class::*_fn)(Param1, Param2, Param3, Param4) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2, arg3, arg4); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4) const noexcept; + Class const *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; +}; +template +struct SelectStoredConstNoExceptMemberFunctionPointerCall4 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionPointerCall4 >::type type; +}; +#endif + template struct StoredFunctorCall5: public RunFunctionTask { @@ -1270,6 +2065,164 @@ struct SelectStoredConstMemberFunctionPointerCall5 Type, VoidStoredConstMemberFunctionPointerCall5 >::type type; }; +#if defined(__cpp_noexcept_function_type) && __cpp_noexcept_function_type >= 201510 +template +class StoredNoExceptMemberFunctionCall5 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +class VoidStoredNoExceptMemberFunctionCall5 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept; + Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +struct SelectStoredNoExceptMemberFunctionCall5 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionCall5 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionCall5 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + this->result = (object.*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +class VoidStoredConstNoExceptMemberFunctionCall5 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, const Class &_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + (object.*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept; + const Class object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +struct SelectStoredConstNoExceptMemberFunctionCall5 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionCall5 >::type type; +}; +template +class StoredNoExceptMemberFunctionPointerCall5 : public RunFunctionTask +{ +public: + StoredNoExceptMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +class VoidStoredNoExceptMemberFunctionPointerCall5 : public RunFunctionTask +{ +public: + VoidStoredNoExceptMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) noexcept, Class *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) noexcept; + Class *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +struct SelectStoredNoExceptMemberFunctionPointerCall5 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredNoExceptMemberFunctionPointerCall5 >::type type; +}; +template +class StoredConstNoExceptMemberFunctionPointerCall5 : public RunFunctionTask +{ +public: + StoredConstNoExceptMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + this->result = (object->*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept; + Class const *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +class VoidStoredConstNoExceptMemberFunctionPointerCall5 : public RunFunctionTask +{ +public: + VoidStoredConstNoExceptMemberFunctionPointerCall5(T (Class::*_fn)(Param1, Param2, Param3, Param4, Param5) const noexcept, Class const *_object, const Arg1 &_arg1, const Arg2 &_arg2, const Arg3 &_arg3, const Arg4 &_arg4, const Arg5 &_arg5) + : fn(_fn), object(_object), arg1(_arg1), arg2(_arg2), arg3(_arg3), arg4(_arg4), arg5(_arg5){ } + + void runFunctor() override + { + (object->*fn)(arg1, arg2, arg3, arg4, arg5); + } +private: + T (Class::*fn)(Param1, Param2, Param3, Param4, Param5) const noexcept; + Class const *object; + Arg1 arg1; Arg2 arg2; Arg3 arg3; Arg4 arg4; Arg5 arg5; +}; +template +struct SelectStoredConstNoExceptMemberFunctionPointerCall5 +{ + typedef typename SelectSpecialization::template + Type, + VoidStoredConstNoExceptMemberFunctionPointerCall5 >::type type; +}; +#endif template class StoredFunctorCall : public RunFunctionTask