From 62f43ea93d20d69fd0a81c4f9ef4e50bc813f2f7 Mon Sep 17 00:00:00 2001 From: Naios Date: Thu, 2 Jul 2015 02:29:54 +0200 Subject: [PATCH] reenable some mockups --- include/Continuable.h | 6 +++--- test.cpp | 20 ++++++++++++++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/include/Continuable.h b/include/Continuable.h index a84ee4f..1f62adb 100644 --- a/include/Continuable.h +++ b/include/Continuable.h @@ -195,15 +195,15 @@ public: /// Placeholder template - Continuable& some(std::size_t const count, _CTy&&...) + Continuable some(std::size_t const count, _CTy&&...) { - return *this; + return std::move(*this); } /// Placeholder template auto any(_CTy&&... functionals) - -> Continuable& // FIXME gcc build &-> decltype(some(1, std::declval<_CTy>()...)) + -> Continuable // FIXME gcc build &-> decltype(some(1, std::declval<_CTy>()...)) { // Equivalent to invoke `some` with count 1. return some(1, std::forward<_CTy>(functionals)...); diff --git a/test.cpp b/test.cpp index e585abb..1475f22 100644 --- a/test.cpp +++ b/test.cpp @@ -135,7 +135,7 @@ inline auto apply(F && f, T && t) int main(int /*argc*/, char** /*argv*/) { - /* + CastSpellPromise(1) .then([](SpellCastResult) { @@ -184,7 +184,7 @@ int main(int /*argc*/, char** /*argv*/) { std::cout << "Finished" << std::endl; }); - */ + //Continuable cb = make_continuable([](Callback&& callback) //{ @@ -378,17 +378,29 @@ int main(int /*argc*/, char** /*argv*/) }); */ - auto promise = std::move(make_continuable() + auto promise = make_continuable() .all( [] { + // void return CastSpellPromise(10); }, [] { + return CastSpellPromise(20); - })); + }) + .then([](SpellCastResult, SpellCastResult) + { + + + }) + .then([] + { + + + }); std::cout << "ok" << std::endl; return 0;