namespace std::execution {
struct just_stopped_t { unspecified };
inline constexpr just_stopped_t just_stopped{};
}
概要
just_stopped
は、非同期操作の開始(start)で停止完了関数を呼び出すSenderファクトリである。
効果
呼び出し式just_stopped()
は下記と等価。
make-sender(just_stopped, product-type{})
Senderアルゴリズムタグ just_stopped
Senderアルゴリズム動作説明用のクラステンプレートimpls-for
に対して、下記の特殊化が定義される。
namespace std::execution {
template<>
struct impls-for<decayed-typeof<just_stopped>> : default-impls {
static constexpr auto start =
[](auto& state, auto& rcvr) noexcept -> void {
/*auto& [...ts] = state;*/
set_stopped(std::move(rcvr));
};
};
}
カスタマイゼーションポイント
Receiverとの接続(connect)時に、関連付けられた実行ドメインに対してexecution::transform_sender
経由でSender変換が行われる。
デフォルト実行ドメインでは無変換。
例
#include <execution>
namespace ex = std::execution;
int main()
{
// 停止を送信するSender
ex::sender auto sndr = ex::just_stopped();
}
出力
バージョン
言語
- C++26
処理系
- Clang: ??
- GCC: ??
- ICC: ??
- Visual C++: ??