libstdc++: Remove inheritance from std::coroutine_handle<> [LWG 3460]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 20 Oct 2020 10:18:35 +0000 (11:18 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 20 Oct 2020 10:37:48 +0000 (11:37 +0100)
commit2c2278f300cdd5f3181fe7df4dd1d869a67266a9
treead787a015636ecdd36359e7801ee45298c6128ea
parent8c3846e80210ba437644b5b91d9bd9c564ca565a
libstdc++: Remove inheritance from std::coroutine_handle<> [LWG 3460]

This removes the coroutine_handle<> base class from the primary template
and the noop_coroutine_promise explicit specialization. To preserve the
API various members are added, as they are no longer inherited from the
base class.

I've also tweaked some indentation and formatting, and replaced
subclause numbers from the standard with stable names like
[coroutine.handle.con].

libstdc++-v3/ChangeLog:

* include/std/coroutine (coroutine_handle<_Promise>): Remove
base class. Add constructors, conversions, accessors etc. as
proposed for LWG 3460.
(coroutine_handle<noop_coroutine_promise>): Likewise.
* testsuite/18_support/coroutines/lwg3460.cc: New test.
libstdc++-v3/include/std/coroutine
libstdc++-v3/testsuite/18_support/coroutines/lwg3460.cc [new file with mode: 0644]