[PATCH] D45121: [coroutines] Add noop_coroutine to <experimental/coroutine>
Lewis Baker via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 3 18:13:23 PDT 2018
lewissbaker accepted this revision.
lewissbaker added a comment.
This revision is now accepted and ready to land.
The `coroutine_handle<noop_coroutine_promise>` type does not have a `from_address()` or a `from_promise()` static functions in the same way that the `coroutine_handle<P>` implementation does.
Is this intentional or an oversight in the TS wording?
They don't seem hugely useful, so I'm not that worried.
If you know that you have a `coroutine_handle<noop_coroutine_promise>` then you can just use `noop_coroutine()` to get the handle instead.
================
Comment at: test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp:62
+ assert(h.address() != nullptr);
+}
+
----------------
Maybe also add a test for `from_address()`?
eg. `assert(coroutine_handle<>::from_address(h.address()) == base);`
https://reviews.llvm.org/D45121
More information about the cfe-commits
mailing list