diff --git a/include/continuable/continuable-promise-base.hpp b/include/continuable/continuable-promise-base.hpp index bacdcf0..af35a0d 100644 --- a/include/continuable/continuable-promise-base.hpp +++ b/include/continuable/continuable-promise-base.hpp @@ -36,10 +36,13 @@ #include #include +#include namespace cti { -template -class promise_base { +template +class promise_base; +template +class promise_base, Data> { /// \cond false // The callback type Data data_; @@ -65,21 +68,18 @@ public: /// \endcond /// Resolves the continuation with the given values - template - void set_value(Args&&... args) { - data_(std::forward(args)...); + void set_value(Args... args) { + data_(std::move(args)...); } /// Resolves the continuation with the given values - template - void operator()(Args&&... args) { - data_(std::forward(args)...); + void operator()(Args... args) { + data_(std::move(args)...); } /// Resolves the continuation with the given error variable. - template - void set_error(Arg&& arg) { - data_(detail::base::dispatch_error_tag{}, std::forward(arg)); + void set_error(detail::base::error_type error) { + data_(detail::base::dispatch_error_tag{}, std::move(error)); } }; } // end namespace cti