std::execution::schedule, std::execution::schedule_result_t
From cppreference.com
| ヘッダ <execution> で定義 |
||
| struct schedule_t { /*未指定*/ }; |
(1) | (C++26以降) |
| inline constexpr schedule_t schedule{}; |
(2) | (C++26以降) (カスタマイズポイントオブジェクト) |
| 呼び出しシグネチャ |
||
| execution::sender auto schedule( execution::scheduler auto sch ); |
(C++26以降) | |
| ヘルパー結果型 |
||
| template< execution::scheduler Sch > using schedule_result_t = decltype(schedule(std::declval<Sch>())); |
(3) | (C++26以降) |
指定されたスケジューラでタスクグラフの開始を表すセ��ダーを取得します。
サブ式 sch について、式 schedule(sch) は sch.schedule() と 式同等です。
カスタマイゼーションポイントオブジェクト
execution::schedule という名前は、カスタマイズポイントオブジェクトを指します。これは、リテラルな semiregular クラス型の、cv 修飾されていない const の 関数オブジェクトです。その型の cv 修飾されていないバージョンは、execution::schedule_t というタグ型で表されます。
execution::schedule_t のすべてのインスタンスは等価です。同じ引数に対して型 execution::schedule_t の異なるインスタンスを呼び出す効果は、インスタンスを表す式が lvalue か rvalue か、また cv 修飾されているかどうかにかかわらず同等です(ただし、volatile 修飾されたインスタンスは呼び出し可能である必要はありません)。したがって、execution::schedule は自由にコピーでき、そのコピーは相互に交換可能に使用できます。
型 Args... のセットが与えられた場合、std::declval<Args>()... が上記の execution::schedule の引数に対する要件を満たす場合、execution::schedule_t は以下をモデル化します。
- std::invocable<execution::schedule_t, Args...>,
- std::invocable<const execution::schedule_t, Args...>,
- std::invocable<execution::schedule_t&, Args...>、および
- std::invocable<const execution::schedule_t&, Args...>.
それ以外の場合、execution::schedule_t の関数呼び出し演算子はオーバーロード解決に参加しません。
[編集] 例
| このセクションは未完成です 理由: 例がありません |