diff --git a/include/continuable/detail/base.hpp b/include/continuable/detail/base.hpp index c4039d2..17d08af 100644 --- a/include/continuable/detail/base.hpp +++ b/include/continuable/detail/base.hpp @@ -65,8 +65,6 @@ namespace detail { namespace base { /// A tag which is used to execute the continuation inside the current thread struct this_thread_executor_tag {}; -/// A tag which is used to continue with a real result -struct dispatch_result_tag {}; /// A tag which is used to continue with an error struct dispatch_error_tag {}; @@ -200,8 +198,7 @@ constexpr auto invoker_of(traits::identity) { auto result = std::forward(callback)( std::forward(args)...); - std::forward(next_callback)( - dispatch_result_tag{}, std::move(result)); + std::forward(next_callback)(std::move(result)); }, traits::identity_of()); } @@ -213,8 +210,7 @@ constexpr auto invoker_of(traits::identity) { std::forward(callback)( std::forward(args)...); - std::forward(next_callback)( - dispatch_result_tag{}); + std::forward(next_callback)(); }, traits::identity<>{}); } @@ -230,7 +226,7 @@ constexpr auto sequenced_unpack_invoker() { /// TODO Add inplace resolution here std::forward(next_callback)( - dispatch_result_tag{}, std::forward(types)...); + std::forward(types)...); }); }; } @@ -298,7 +294,7 @@ struct result_proxy { NextCallback next_callback_; /// The operator which is called when the result was provided - void operator()(dispatch_result_tag, Args... args) { + void operator()(Args... args) { // In order to retrieve the correct decorator we must know what the // result type is. auto result = traits::identity_of(continuation), partial_callable = std::move(partial_callable), executor = std::forward(executor)