diff --git a/include/Continuable.h b/include/Continuable.h index 9970283..6874a92 100644 --- a/include/Continuable.h +++ b/include/Continuable.h @@ -509,11 +509,8 @@ namespace detail std::mutex lock; - template - struct result_store_sequencer; - - template - struct result_store_sequencer, Offset> + template + struct result_store_sequencer { template inline static void partial_set(Tuple& result, Current&& current) @@ -552,10 +549,8 @@ namespace detail template void store(Args&&... args) { - result_store_sequencer< - fu::sequence_of_t, - Offset - >::store(result, std::forward(args)...); + result_store_sequencer:: + store(result, std::forward(args)...); // TODO Improve the lock here std::lock_guard guard(lock); @@ -666,7 +661,7 @@ namespace detail // TODO Use the stack instead of heap variables. auto shared_args = std::make_shared>( - std::make_tuple(std::forward<_ATy>(args)...)); + std::forward_as_tuple(std::forward<_ATy>(args)...)); // Fake continuable which wraps all continuables together return make_continuable([=](Callback<_RTy...>&& callback) mutable diff --git a/test.cpp b/test.cpp index 0d9a1ac..ae8b9f9 100644 --- a/test.cpp +++ b/test.cpp @@ -415,15 +415,13 @@ int main(int /*argc*/, char** /*argv*/) [] { return make_continuable([](Callback&& callback) { - callback(true, false, 0.3f, std::string("huhu all work is done!")); + callback(true, false, 0.3f, std::string("oh, all work is done!")); }); }, TrivialPromise()) .then([](SpellCastResult r0, SpellCastResult r1, bool r2, bool r3, double r4, std::string message) { - - - return Log(message); + return TrivialPromise("Lets see... ").then(Log(message)); }) .then([] {