libunifex
libunifex copied to clipboard
add co_file_copy example
This is just like the file_copy example, but uses the compilers implementation of C++20 coroutines to compose the senders and manage the lifetimes of variables.
The result is much fewer lines of code and a more intuitive code organization. The tradeoff is less control over how many allocations there are.
This should not be merged yet. This is expected to fail CI. There are changes needed to the build system to support coroutines, with clang on unix at least.. This example manually forces coroutines on and I do not expect that to work.