namespace std::execution {
template<class Sndr, class Env = env<>>
requires sender_in<Sndr, Env>
constexpr bool sends_stopped =
!same_as<type-list<>,
gather-signatures<set_stopped_t, completion_signatures_of_t<Sndr, Env>,
type-list, type-list>>;
}
概要
Sender型Sndr
が環境Env
において非同期操作を作成できるとき、完了シグネチャ集合が停止完了シグネチャを含むか否かを返す。
例
#include <concepts>
#include <execution>
namespace ex = std::execution;
int main()
{
// 停止完了シグネチャを持たないSender
ex::sender auto snd1 = ex::just(123, 'X');
static_assert(not ex::sends_stopped<decltype(snd1)>);
// 停止完了シグネチャ set_stopped_t()
ex::sender auto snd2 = ex::just_stopped();
static_assert(ex::sends_stopped<decltype(snd2)>);
}
出力
バージョン
言語
- C++26
処理系
- Clang: ??
- GCC: ??
- ICC: ??
- Visual C++: ??