@@ -427,6 +427,8 @@ struct operation_base : WSAOVERALAPPED {
427
427
428
428
template<typename Receiver>
429
429
struct recv_op : operation_base {
430
+ using operation_state_concept = std::execution::operation_state_t;
431
+
430
432
recv_op(SOCKET s, void* data, size_t len, Receiver r)
431
433
: receiver(std::move(r))
432
434
, sock(s) {
@@ -772,6 +774,7 @@ struct _retry_receiver
772
774
// re-construct and re-start it if the operation fails.
773
775
template<class S, class R>
774
776
struct _retry_op {
777
+ using operation_state_concept = stdexec::operation_state_t;
775
778
using _child_op_t =
776
779
stdexec::connect_result_t<S&, _retry_receiver<S, R>>;
777
780
@@ -899,7 +902,9 @@ namespace stdexec = std::execution;
899
902
class inline_scheduler {
900
903
template <class R>
901
904
struct _op {
905
+ using operation_state_concept = operation_state_t;
902
906
R rec_;
907
+
903
908
void start() & noexcept {
904
909
stdexec::set_value(std::move(rec_));
905
910
}
@@ -4871,6 +4876,8 @@ namespace std::execution {
4871
4876
inline constexpr set_stopped_t set_stopped{};
4872
4877
4873
4878
// [exec.opstate] , operation states
4879
+ struct operation_state_t {};
4880
+
4874
4881
template<class O>
4875
4882
concept operation_state = <i> see below</i> ;
4876
4883
@@ -5456,8 +5463,15 @@ enum class forward_progress_guarantee {
5456
5463
type ([async.ops] ).
5457
5464
5458
5465
<pre highlight="c++">
5466
+ template<class Rcvr>
5467
+ concept <i> enable-opstate</i> = // exposition only
5468
+ requires {
5469
+ requires derived_from<typename Rcvr::operation_state_concept, operation_state_t>;
5470
+ };
5471
+
5459
5472
template<class O>
5460
5473
concept operation_state =
5474
+ <i> enable-opstate</i> <remove_cvref_t<O>> &&
5461
5475
queryable<O> &&
5462
5476
is_object_v<O> &&
5463
5477
requires (O& o) {
@@ -5815,6 +5829,7 @@ enum class forward_progress_guarantee {
5815
5829
requires <i> well-formed</i> <<i> state-type</i> , Sndr, Rcvr> &&
5816
5830
<i> well-formed</i> <<i> inner-ops-tuple</i> , Sndr, Rcvr>
5817
5831
struct <i> basic-operation</i> { // exposition only
5832
+ using operation_state_concept = operation_state_t;
5818
5833
using <i> tag-type</i> = tag_of_t<Sndr>; // exposition only
5819
5834
5820
5835
Rcvr rcvr_; // exposition only
@@ -6378,6 +6393,7 @@ template<class Domain, class Tag, sender Sndr, class... Args>
6378
6393
6379
6394
<pre highlight="c++">
6380
6395
struct <i> operation-state-task</i> {
6396
+ using operation_state_concept = operation_state_t;
6381
6397
using promise_type = <i> connect-awaitable-promise</i> ;
6382
6398
coroutine_handle<> <i> coro</i> ; <i> // exposition only</i>
6383
6399
0 commit comments