@@ -312,7 +312,7 @@ struct fold_left_fn {
312312 I i = first;
313313 return (*this)(++i, last, u, f); // recursive Kleisli composition
314314 });
315- return std::move(nxt); // inductive case: bind + recurse
315+ return std::move(nxt); // inductive case: bind + recurse
316316 }
317317};
318318```
@@ -336,16 +336,16 @@ The `any_sender_of` type is provided by the [stdexec](https://github.com/NVIDIA/
336336The following example is drawn from [ backtrack.cpp] ( https://github.com/steve-downey/sender-examples/blob/main/src/examples/backtrack.cpp ) <sup >[ 31] </sup > in the sender-examples repository:
337337
338338``` cpp
339- auto search_tree (auto test, // predicate
340- tree::NodePtr<int > tree, // current node
341- stdexec::scheduler auto sch, // execution context
342- any_node_sender&& fail) // the continuation (failure recovery)
339+ auto search_tree (auto test, // predicate
340+ tree::NodePtr<int > tree, // current node
341+ stdexec::scheduler auto sch, // execution context
342+ any_node_sender&& fail) // the continuation (failure recovery)
343343 -> any_node_sender { // type-erased monadic return
344344 if (tree == nullptr) {
345345 return std::move(fail); // invoke the continuation
346346 }
347347 if (test(tree)) {
348- return stdexec::just(tree); // pure/return: lift into context
348+ return stdexec::just(tree); // pure/return: lift into context
349349 }
350350 return stdexec::on(sch, stdexec::just()) // schedule on executor
351351 | stdexec::let_value( // monadic bind (>>=)
@@ -361,7 +361,8 @@ auto search_tree(auto test, // predicate
361361 test,
362362 tree->right(), // with failure continuation
363363 sch,
364- std::move(fail)); // continuation-passing failure recovery
364+ std::move(fail)); // continuation-passing
365+ // failure recovery
365366 }));
366367 });
367368}
@@ -387,7 +388,7 @@ The following example is drawn from [retry.hpp](https://github.com/NVIDIA/stdexe
387388``` cpp
388389// Deferred construction helper - emplaces non-movable types
389390// into std::optional via conversion operator
390- template <std::invocable Fun> // higher-order function wrapper
391+ template <std::invocable Fun> // higher-order function wrapper
391392 requires std::is_nothrow_move_constructible_v<Fun>
392393struct _conv {
393394 Fun f_ ; // stored callable
@@ -410,7 +411,7 @@ struct _retry_receiver // receiver adaptor pa
410411 _ retry_receiver<S, R>> {
411412 _ op<S, R>* o_ ; // pointer to owning op state
412413
413- auto base() && noexcept -> R&& { // access inner receiver (rvalue)
414+ auto base() && noexcept -> R&& { // access inner receiver (rvalue)
414415 return static_cast<R&&>(o_->r_);
415416 }
416417 auto base () const & noexcept -> const R& { // access inner receiver (const)
@@ -429,31 +430,31 @@ struct _retry_receiver // receiver adaptor pa
429430// and re-constructed on each retry
430431template <class S , class R>
431432struct _ op {
432- S s_ ; // the sender to retry
433- R r_ ; // the downstream receiver
434- std::optional< // optional nested op state
435- stdexec::connect_result_t< // type of connect(S, retry_rcvr)
436- S&, _ retry_receiver<S, R>>> o_ ; // re-created on each retry
433+ S s_ ; // the sender to retry
434+ R r_ ; // the downstream receiver
435+ std::optional< // optional nested op state
436+ stdexec::connect_result_t< // type of connect(S, retry_rcvr)
437+ S&, _ retry_receiver<S, R>>> o_ ; // re-created on each retry
437438
438- _op(S s, R r) // construct from sender + receiver
439+ _op(S s, R r) // construct from sender + receiver
439440 : s_(static_cast<S&&>(s))
440441 , r_(static_cast<R&&>(r))
441442 , o_{_connect()} {} // initial connection
442443
443444 _op(_op&&) = delete; // immovable (stable address)
444445
445- auto _connect() noexcept { // connect sender to retry receiver
446- return _conv{[this] { // deferred construction via _conv
447- return stdexec::connect( // connect sender
448- s_, // to retry receiver
449- _retry_receiver<S, R>{this}); // that points back to this op
446+ auto _connect() noexcept { // connect sender to retry receiver
447+ return _conv{[this] { // deferred construction via _conv
448+ return stdexec::connect( // connect sender
449+ s_, // to retry receiver
450+ _retry_receiver<S, R>{this}); // that points back to this op
450451 }};
451452 }
452453
453454 void _retry () noexcept { // retry: destroy and reconnect
454455 STDEXEC_TRY {
455- o_.emplace(_connect()); // re-emplace the operation state
456- stdexec::start (* o_ ); // restart the operation
456+ o_.emplace(_connect()); // re-emplace the operation state
457+ stdexec::start (* o_ ); // restart the operation
457458 }
458459 STDEXEC_CATCH_ALL { // if reconnection itself throws
459460 stdexec::set_error( // propagate to downstream
@@ -477,15 +478,15 @@ struct _retry_sender {
477478 explicit _retry_sender(S s) // construct from inner sender
478479 : s_(static_cast<S&&>(s)) {}
479480
480- template <class > // completion signature transform:
481- using _error = stdexec::completion_signatures<>; // remove all error signatures
481+ template <class > // completion signature transform:
482+ using _error = stdexec::completion_signatures<>; // remove all error signatures
482483
483484 template <class ... Args>
484485 using _ value = // pass through value signatures
485486 stdexec::completion_signatures<
486487 stdexec::set_value_t(Args...)>;
487488
488- template <class Self, class... Env> // compute transformed signatures
489+ template <class Self, class... Env> // compute transformed signatures
489490 static consteval auto get_completion_signatures()
490491 -> stdexec::transform_completion_signatures< // signature transformation
491492 stdexec::completion_signatures_of_t<S&, Env...>, // from inner sender's sigs
@@ -569,7 +570,7 @@ auto schedule() const noexcept {
569570
570571```cpp
571572// From nvexec/stream/common.cuh - CUDA kernel launch syntax
572- continuation_kernel<<<1, 1, 0, get_stream()>>>( // <<<grid, block, smem, stream>>>
573+ continuation_kernel<<<1, 1, 0, get_stream()>>>( // <<<grid, block, smem, stream>>>
573574 static_cast<R&&>(rcvr_), Tag(), static_cast<Args&&>(args)...);
574575```
575576
0 commit comments