Execution library (since C++26)

submited by
Style Pass
2024-11-18 14:00:18

The library aims to provide vocabulary types for asynchronous operations and to allow the construction of task execution graphs in a simple, composable way.

A sender factory is a function that returns a sender and whose parameters have types for which the sender concept is false .

A sender adaptor is a function returning a sender whose parameters include at least one whose type satisfies the sender concept, and for which the returned sender is a parent sender of the adaptor function's sender arguments.

A version of this example is available on godbolt.org, where it uses stdexec, an experimental reference implementation of std::execution .

Leave a Comment