From 86b1bab87e0a4049f6fc9d2fedec323556f5ef27 Mon Sep 17 00:00:00 2001 From: Determinant Date: Sat, 3 Feb 2018 15:45:55 -0500 Subject: eliminate the need for promise::None --- test.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test.cpp') diff --git a/test.cpp b/test.cpp index 62a07de..f169828 100644 --- a/test.cpp +++ b/test.cpp @@ -59,9 +59,12 @@ int main() { return 12; }).then(f).then(a1).fail(a2).then(b1).fail(b2).then(g).then(a3, b3) .then([](int x) { - puts("void return will automatically yield promise::none"); + puts("void return is ok"); }).then([]() { - puts("void parameter will automatically be promise::None"); + puts("void parameter is ok"); + return 1; + }).then([]() { + puts("void parameter will ignore the returned value"); }); auto p1 = promise_t([&t4](promise_t pm) { @@ -94,7 +97,6 @@ int main() { }) .then([](const promise::values_t values) { printf("finally %d\n", any_cast(values[1])); - return promise::none; }); puts("calling t"); t4(); -- cgit v1.2.3