66
77#include < beman/execution26/detail/sender.hpp>
88#include < beman/execution26/detail/notify.hpp>
9+ #include < beman/execution26/detail/immovable.hpp>
910#include < atomic>
1011#include < mutex>
1112#include < utility>
@@ -19,15 +20,12 @@ class simple_counting_scope;
1920
2021// ----------------------------------------------------------------------------
2122
22- class beman ::execution26::simple_counting_scope {
23+ class beman ::execution26::simple_counting_scope
24+ : ::beman::execution26::detail::immovable {
2325 public:
2426 class token ;
2527 class assoc ;
2628
27- simple_counting_scope () = default ;
28- simple_counting_scope (simple_counting_scope&&) = delete ;
29- ~simple_counting_scope () = default ;
30-
3129 auto get_token () noexcept -> token;
3230 auto close () noexcept -> void {
3331 switch (this ->state ) {
@@ -60,7 +58,7 @@ class beman::execution26::simple_counting_scope {
6058 }
6159
6260 private:
63- enum class state_t { unused, open, open_and_joining, closed, closed_and_joining, unused_and_closed, joined };
61+ enum class state_t : unsigned char { unused, open, open_and_joining, closed, closed_and_joining, unused_and_closed, joined };
6462 friend class assoc ;
6563 auto try_associate () noexcept -> simple_counting_scope* {
6664 ::std::lock_guard lock (this ->mutex );
@@ -92,6 +90,7 @@ class beman::execution26::simple_counting_scope {
9290
9391// ----------------------------------------------------------------------------
9492
93+ // NOLINTBEGIN(misc-unconventional-assign-operator)
9594class beman ::execution26::simple_counting_scope::assoc {
9695 public:
9796 assoc () = default ;
@@ -102,7 +101,7 @@ class beman::execution26::simple_counting_scope::assoc {
102101 this ->scope ->disassociate ();
103102 }
104103
105- auto operator =(assoc other) noexcept -> assoc {
104+ auto operator =(assoc other) noexcept -> assoc& {
106105 ::std::swap (this ->scope, other.scope);
107106 return *this ;
108107 }
@@ -115,6 +114,7 @@ class beman::execution26::simple_counting_scope::assoc {
115114 : scope(scope ? scope->try_associate () : nullptr) {}
116115 beman::execution26::simple_counting_scope* scope{};
117116};
117+ // NOLINTEND(misc-unconventional-assign-operator)
118118
119119// ----------------------------------------------------------------------------
120120
0 commit comments