aboutsummaryrefslogtreecommitdiff
path: root/test.cpp
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2018-02-02 23:51:49 -0500
committerDeterminant <ted.sybil@gmail.com>2018-02-02 23:51:49 -0500
commit36f0bb49e5c3efbf9363b245e42ebdd74a0ab9ee (patch)
tree98fe8b68e1a0794a24f82cd1f6a3327267219ac6 /test.cpp
parent27bd83047dc6d5d0bf137db82f372fcd97656a31 (diff)
more friendly interface
Diffstat (limited to 'test.cpp')
-rw-r--r--test.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/test.cpp b/test.cpp
index d99806f..62a07de 100644
--- a/test.cpp
+++ b/test.cpp
@@ -57,7 +57,12 @@ int main() {
}).then([](int x) {
printf("%d\n", x);
return 12;
- }).then(f).then(a1).fail(a2).then(b1).fail(b2).then(g).then(a3, b3);
+ }).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");
+ }).then([]() {
+ puts("void parameter will automatically be promise::None");
+ });
auto p1 = promise_t([&t4](promise_t pm) {
puts("p1");