diff --git a/include/Continuable.h b/include/Continuable.h index 4771ddf..8249cbc 100644 --- a/include/Continuable.h +++ b/include/Continuable.h @@ -481,15 +481,20 @@ namespace detail multiple_result_maker<0, fu::identity<>, fu::identity<>, Args...>; }; + template + struct multiple_when_all_chainer_t_make_result; + template + struct multiple_when_all_chainer_t_make_result> + { + typedef std::function()> type; + + // type create() + }; template struct multiple_when_all_chainer_t, fu::identity<_CTy...>> { - struct helper - { - }; - typedef typename functional_traits<_ATy...>::result_maker_of_t<_CTy...> result_maker; typedef typename result_maker::arguments_t arguments_t; @@ -499,10 +504,14 @@ namespace detail static std::size_t const size = result_maker::size; // Creates one continuable from multiple ones - static auto make_when_all() - -> int + static auto make_when_all(_CTy&&... args) + -> typename multiple_when_all_chainer_t_make_result::type { - return 1; + return make_continuable([]() + { + + + }); } }; } diff --git a/test.cpp b/test.cpp index d7eda20..c85822c 100644 --- a/test.cpp +++ b/test.cpp @@ -345,6 +345,22 @@ int main(int /*argc*/, char** /*argv*/) > >::result_maker::partial_results_t myres123345; + detail::multiple_when_all_chainer_t< + fu::identity<>, + fu::identity< + std::function()>, + std::function()> + > + >::make_when_all( + [] + { + return make_continuable(); + }, + [] + { + return CastSpellPromise(2); + }); + std::cout << "ok" << std::endl; return 0; }