diff --git a/Incubator.cpp b/Incubator.cpp index 7be89ec..579db4c 100644 --- a/Incubator.cpp +++ b/Incubator.cpp @@ -496,6 +496,7 @@ void some_examples() //// Here we go //entry(); +/* detail::unary_chainer_t< std::function()> >::callback_arguments_t args213987; @@ -547,6 +548,7 @@ void some_examples() std::function()> > >::result_maker::partial_results_t myres123345; + */ /* auto firstType = detail::multiple_when_all_chainer_t< @@ -589,7 +591,9 @@ void some_examples() { callback(true, false, 0.3f, std::unique_ptr(new std::string("oh, all work is done!"))); }), - TrivialPromise()) + [] { + return TrivialPromise(); + }) .then([](SpellCastResult r0, SpellCastResult r1, bool r2, bool r3, double r4, std::unique_ptr message) { return TrivialPromise("Lets see... ").then(Log(*message)); @@ -706,4 +710,14 @@ void test_cross_forward() void test_incubator() { test_cross_forward(); + + std::function(int, float)> fn1 = detail::partial_corrector::correct([](int, float) + { + return make_continuable(); + }); + + std::function(int, float)> fn2 = detail::partial_corrector::correct([] + { + return make_continuable(); + }); } diff --git a/include/Continuable.h b/include/Continuable.h index 1e3cf4a..2ae9706 100644 --- a/include/Continuable.h +++ b/include/Continuable.h @@ -451,11 +451,9 @@ namespace detail template static inline auto partialize_correct_trait(_CTy&& functional) - // -> decltype(partial_corrector<_ATy>::correct(std::declval<_CTy>())) - -> _CTy + -> decltype(partial_corrector<_ATy...>::correct(std::declval<_CTy>())) { - // return partial_corrector<_ATy>::correct(std::forward<_CTy>(functional)); - return std::forward<_CTy>(functional); + return partial_corrector<_ATy...>::correct(std::forward<_CTy>(functional)); } /// Wrap Continuables into the continuable returning functional type.