forked from mirror/capnproto
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ab12d40915
This adds support for the Coroutines TS to libkj. Specifically, you can now co_await kj::Promise<T> objects from inside functions which themselves return kj::Promise<U> objects. I tested this with Clang/libc++ 12 and 13. The work was also largely developed against VS2019, so I expect it to work there, but I haven't tested the final commit.. * For Clang with autotools / CMake it should be sufficient to configure the toolchain like so, then configure and build like normal: export CC=clang export CXX=clang++ export CXXFLAGS="-std=gnu++17 -fcoroutines-ts -stdlib=libc++" export LDFLAGS="-fcoroutines-ts -stdlib=libc++" ./configure && make check * For VS2019, add -DCMAKE_CXX_FLAGS="/std:c++17 /await /EHsc" to your regular CMake command line. (The /EHsc shuts up a compiler warning...) VS2019 and GCC both apparently support C++20-standardized coroutines, but VS2019's version seems ICE-y, and I'm too lazy to figure out how to install GCC 10 on Debian Buster. |
3 years ago | |
---|---|---|
.. | ||
index.md | 4 years ago | |
style-guide.md | 4 years ago | |
tour.md | 3 years ago |