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

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 23 11:00:59 PST 2021


Quuxplusone 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);
+
----------------
ChuanqiXu wrote:
> 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?
Sure, swap either pair, as long as it ends up consistent.


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

https://reviews.llvm.org/D116144



More information about the libcxx-commits mailing list