An open API service indexing awesome lists of open source software.

https://github.com/tx7do/test_cxx20_coroutine


https://github.com/tx7do/test_cxx20_coroutine

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

# test_cxx20_coroutine

GCC 10以及以上支持,以下的版本不支持。

需要包含`-fcoroutines`标识符,否则不能使用协程功能。

cmake当中加入标识符有以下方式:

```cmake
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcoroutines")

add_compile_options( "-fcoroutines")

target_compile_options( PRIVATE "-fcoroutines")

target_add_compile_flags_if_supported( PRIVATE -fcoroutines)
```

## 参考资料

- [Your first coroutine](https://blog.panicsoftware.com/your-first-coroutine/)