[libcxx-commits] [PATCH] D116144: [libcxx] [Coroutines] Support noop_coroutine for GCC

Chuanqi Xu via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 22 20:35:48 PST 2021


ChuanqiXu added inline comments.


================
Comment at: libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp:71-72
+  base();
+  assert(base);
+  assert(base.done() == false);
+
----------------
Quuxplusone wrote:
> ChuanqiXu wrote:
> > Quuxplusone wrote:
> > > Let's keep these consistent with lines 60–61. I have no preference on the order or whether they end with `, ""`, but let's be consistent one way or the other.
> > We can't do that. Since `noop_coroutine_handle::done()` is constexpr and `std::coroutine_handle<>::done()` isn't constexpr.
> Oops, I hadn't noticed that these were regular `assert` instead of `static_assert`. So they can't use `, ""`; but at least you can put them in the same order: i.e., please swap lines 69 and 70.
Yeah, but is is weird to see `assert(X.y() && X)` since it would crash if X is null. How do you think about swap lines 58 and 59?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116144/new/

https://reviews.llvm.org/D116144



More information about the libcxx-commits mailing list