#include #include "continuable/continuable.hpp" template using continuable = decltype(make_continuable(std::declval>)); int main(int, char**) { // continuable c; auto dispatcher = SelfDispatcher{}; /*(makeTestContinuation() && makeTestContinuation()) .undecorateFor([]() { });*/ /*auto unwrapper = [](auto&&... args) { return std::common_type>{}; };*/ // using T = decltype(unwrap(FailIfWrongArgs<0>{})); // using T = decltype(unwrap(std::declval())); // T t{}; // auto combined = makeTestContinuation() && makeTestContinuation(); int res = 0; makeTestContinuation() .then([](std::string) { return std::make_tuple(47, 46, 45); }) // .post(dispatcher) .then([](int val1, int val2, int val3) { return val1 + val2 + val3; }) .then([&](int val) { res += val; }) .then([] { return makeTestContinuation(); }) .then(makeTestContinuation()) .then([] (std::string arg) { }); return res; }