diff --git a/include/continuable/continuable-base.hpp b/include/continuable/continuable-base.hpp index 8f280f3..1e5c987 100644 --- a/include/continuable/continuable-base.hpp +++ b/include/continuable/continuable-base.hpp @@ -718,18 +718,6 @@ private: } }; -/*template -struct continuable_trait -#ifdef DOXYGEN -{ - /// Deduces to a true_type if the continuable_base is a concrete type - /// which means all lazy expression templates were materialized and - /// the continuable can be queried for a direct result through is_ready. - using is_concrete = std::true_type; -} -#endif -;*/ - /// Creates a continuable_base from a promise/callback taking function. /// /// \tparam Args The types (signature hint) the given promise is resolved with. diff --git a/include/continuable/detail/core/base.hpp b/include/continuable/detail/core/base.hpp index 3699ba3..ad73dea 100644 --- a/include/continuable/detail/core/base.hpp +++ b/include/continuable/detail/core/base.hpp @@ -126,7 +126,7 @@ struct attorney { typename T, typename A, typename Continuable = continuable_base, std::decay_t>> static auto create_from(T&& continuation, A annotation, - util::ownership ownership = {}) { + util::ownership ownership) { (void)annotation; return Continuable({std::forward(continuation)}, ownership); } @@ -755,6 +755,7 @@ auto chain_continuation(Continuation&& continuation, Callback&& callback, next_hint_of(std::integral_constant{}, traits::identify{}, Hint{}); + auto ownership = attorney::ownership_of(continuation); auto data = attorney::consume(std::forward(continuation).finish()); @@ -766,7 +767,7 @@ auto chain_continuation(Continuation&& continuation, Callback&& callback, return attorney::create_from(continuation_t(std::move(data), std::forward(callback), std::forward(executor)), - next_hint); + next_hint, ownership); } /// Final invokes the given continuation chain: