diff --git a/include/Continuable.h b/include/Continuable.h index 8249cbc..4364c0d 100644 --- a/include/Continuable.h +++ b/include/Continuable.h @@ -94,6 +94,10 @@ private: } public: + + /// Developing + Continuable() : _released(true) { } + /// Deleted copy construct Continuable(Continuable const&) = delete; @@ -487,7 +491,7 @@ namespace detail template struct multiple_when_all_chainer_t_make_result> { - typedef std::function()> type; + typedef Continuable type; // type create() }; @@ -507,11 +511,7 @@ namespace detail static auto make_when_all(_CTy&&... args) -> typename multiple_when_all_chainer_t_make_result::type { - return make_continuable([]() - { - - - }); + return multiple_when_all_chainer_t_make_result::type(); } }; } diff --git a/include/functional_unwrap.hpp b/include/functional_unwrap.hpp index ad0100a..e2573be 100644 --- a/include/functional_unwrap.hpp +++ b/include/functional_unwrap.hpp @@ -221,8 +221,8 @@ namespace fu struct invoker> { template - static auto invoke(_FTy&& functional, _TTy&& tuple) - -> ::fu::return_type_of_t::type> + inline static auto invoke(_FTy&& functional, _TTy&& tuple) + -> return_type_of_t::type> { return std::forward<_FTy>(functional)(std::get(std::forward<_TTy>(tuple))...); } diff --git a/test.cpp b/test.cpp index c85822c..c03e0d2 100644 --- a/test.cpp +++ b/test.cpp @@ -345,10 +345,11 @@ int main(int /*argc*/, char** /*argv*/) > >::result_maker::partial_results_t myres123345; - detail::multiple_when_all_chainer_t< + auto firstType = detail::multiple_when_all_chainer_t< fu::identity<>, fu::identity< std::function()>, + std::function()>, std::function()> > >::make_when_all( @@ -358,7 +359,15 @@ int main(int /*argc*/, char** /*argv*/) }, [] { - return CastSpellPromise(2); + return CastSpellPromise(10); + }, + [] + { + return CastSpellPromise(20); + }) + .then([](SpellCastResult, SpellCastResult) + { + }); std::cout << "ok" << std::endl;