Clang: gnu standard library requires -fcoroutines but clang only supports -fcoroutines-ts

半世苍凉 提交于 2021-02-10 14:23:54

问题


It seems like the clang compiler flags are currently not compatible with the gnu standard library. Is there still a way to use coroutines?


回答1:


It's not quite accurate to say that GCC's header requires -fcoroutines, what it actually requires is for the __cpp_impl_coroutine macro to be defined by the compiler, indicating that the compiler supports C++20 Coroutines. With GCC, you activate that support by using -fcoroutines.



来源:https://stackoverflow.com/questions/64525567/clang-gnu-standard-library-requires-fcoroutines-but-clang-only-supports-fcoro

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!