diff --git a/include/continuable/continuable-base.hpp b/include/continuable/continuable-base.hpp index 74781fa..25920f1 100644 --- a/include/continuable/continuable-base.hpp +++ b/include/continuable/continuable-base.hpp @@ -42,6 +42,7 @@ #include #include #include +#include #include namespace cti { @@ -192,9 +193,9 @@ public: /// ``` /// /// \since version 1.0.0 - template + template auto then(T&& callback, - E&& executor = detail::base::this_thread_executor_tag{}) && { + E&& executor = detail::types::this_thread_executor_tag{}) && { return detail::base::chain_continuation(std::move(*this).materialize(), std::forward(callback), std::forward(executor)); @@ -262,12 +263,12 @@ public: /// /// /// \since version 2.0.0 - template + template auto catching(T&& callback, - E&& executor = detail::base::this_thread_executor_tag{}) && { - /*return detail::base::chain_continuation(std::move(*this).materialize(), - std::forward(callback), - std::forward(executor));*/ + E&& executor = detail::types::this_thread_executor_tag{}) && { + return detail::base::chain_error_handler(std::move(*this).materialize(), + std::forward(callback), + std::forward(executor)); } /// Invokes both continuable_base objects parallel and calls the @@ -627,33 +628,6 @@ auto when_seq(Continuables&&... continuables) { return detail::traits::fold(detail::traits::seq_folding(), std::forward(continuables)...); } - -/// Trait to retrieve a continuable_base type with a given type-erasure backend. -/// -/// Every object may me used as type-erasure backend as long as the -/// requirements of a `std::function` like wrapper are satisfied. -/// -/// \tparam CallbackWrapper The type which is used to erase the callback. -/// -/// \tparam ContinuationWrapper The type which is used to erase the -/// continuation data. -/// -/// \tparam Args The current signature of the continuable. -template