diff --git a/include/Continuable.h b/include/Continuable.h index 8c5c2d8..87a7430 100644 --- a/include/Continuable.h +++ b/include/Continuable.h @@ -82,6 +82,14 @@ private: } } + /// Internal onstructor for continuation + template + Continuable(_FTy&& callback_insert, Continuable<_RATy...>&& right) + : _callback_insert(std::forward<_FTy>(callback_insert)), _released(right._released) + { + right._released = true; + } + public: /// Deleted copy construct Continuable(Continuable const&) = delete; @@ -98,13 +106,6 @@ public: Continuable(_FTy&& callback_insert) : _callback_insert(std::forward<_FTy>(callback_insert)), _released(false) { } - template - Continuable(_FTy&& callback_insert, Continuable<_RATy...>&& right) - : _callback_insert(std::forward<_FTy>(callback_insert)), _released(right._released) - { - right._released = true; - } - /// Destructor which calls the dispatch chain if needed. ~Continuable() {