table of contents
std::execution::read(3) | C++ Standard Libary | std::execution::read(3) |
NAME¶
std::execution::read - std::execution::read
Synopsis¶
Defined in header <execution>
execution::sender auto read( auto tag ); (since C++26)
Parameters¶
tag - by which the customization point is recognized
Return value¶
Returns a sender that reaches into a receiver’s
environment and pulls out the
current value associated with the customization point denoted by Tag.
Example¶
Possible usage of tags in read function, to retrieve the value
associated with the
customization point.
execution::sender auto get_scheduler()
{
return read(execution::get_scheduler);
}
execution::sender auto get_delegatee_scheduler()
{
return read(execution::get_delegatee_scheduler);
}
execution::sender auto get_allocator()
{
return read(execution::get_allocator);
}
execution::sender auto get_stop_token()
{
return read(execution::get_stop_token);
}
2024.06.10 | http://cppreference.com |