GCC 10.1 support by dutow · Pull Request #158 · lewissbaker/cppcoro

and others added 5 commits

July 18, 2020 20:18
Starting with GCC 10.1, GCC/libstdc++ supports coroutines, but includes
them in their final location in <coroutine>.

This commit generalizes the location of the header, and the name of the
types (either in the std or std::experimental namespace), so that both
the current Clang/MSVC and the GCC approach can be supported.

This should also guarantee that both current and later Clang/MSVC
releases will be supported by the library.
While clang uses the -fcoroutines-ts flag to add support for the
Coroutines TS, GCC uses the -fcoroutines flag.

This commit refactors the cmake finder to support both.
* Included missing headers
* Disabled a testcase for GCC that uses a syntax not supported by
  GCC10.1
* Reordered a class so GCC is able to find a data member
After these changes, there's one failure remaining with GCC 10.1, where
it doesn't call a destructor for an object, and calls another later than
it should.

Other tests required workarounds for bugs in the GCC coroutine
implementation, but were possible to fix with minor code modifications.

@dutow dutow marked this pull request as draft

July 19, 2020 20:34

lewissbaker

@GIGte GIGte mentioned this pull request

Aug 27, 2020

This was referenced

Oct 10, 2020