diff options
author | Determinant <ted.sybil@gmail.com> | 2018-02-02 23:51:49 -0500 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2018-02-02 23:51:49 -0500 |
commit | 36f0bb49e5c3efbf9363b245e42ebdd74a0ab9ee (patch) | |
tree | 98fe8b68e1a0794a24f82cd1f6a3327267219ac6 /test.cpp | |
parent | 27bd83047dc6d5d0bf137db82f372fcd97656a31 (diff) |
more friendly interface
Diffstat (limited to 'test.cpp')
-rw-r--r-- | test.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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"); |