引数として指定されたタスクのいずれかが正常に完了したら正常に完了するタスクを作成します。
template<
typename _ReturnType
>
task<_ReturnType> operator||(
const task<_ReturnType> & _Lhs,
const task<_ReturnType> & _Rhs
);
template<
typename _ReturnType
>
task<std::vector<_ReturnType>> operator||(
const task<std::vector<_ReturnType>> & _Lhs,
const task<_ReturnType> & _Rhs
);
template<
typename _ReturnType
>
task<std::vector<_ReturnType>> operator||(
const task<_ReturnType> & _Lhs,
const task<std::vector<_ReturnType>> & _Rhs
);
inline task<void> operator||(
const task<void> & _Lhs,
const task<void> & _Rhs
);
パラメーター
_ReturnType
返されたタスクの種類。_Lhs
結果のタスクにまとめる最初のタスク。_Rhs
結果のタスクに組み合わせて 2 番目のタスク。
戻り値
入力タスクのいずれかが正常に完了したときに正常に完了したタスク。入力タスクは型 T場合、この関数の出力は **task<std::vector<T>**です。入力タスクは型 void タスクの出力は、 **task<void>**です。
解説
タスクの両方を取り消すとき、または例外をスローした場合、返されたタスクが取り消された状態で完了し、そのタスクの get() か wait() をダイヤルすると発生した場合、例外の 1 つがスローされます。
必要条件
ヘッダー: ppltasks.h
名前空間: の同時実行