Commit a342380 1 parent 1f93330 commit a342380 Copy full SHA for a342380
File tree 4 files changed +21
-24
lines changed
include/beman/execution26/detail
4 files changed +21
-24
lines changed Original file line number Diff line number Diff line change 7
7
// ----------------------------------------------------------------------------
8
8
9
9
namespace beman ::execution26::detail {
10
- struct immovable {
10
+ struct immovable ;
11
+ struct virtual_immovable ;
12
+ } // namespace beman::execution26::detail
13
+
14
+ struct beman ::execution26::detail::immovable {
11
15
constexpr immovable () = default;
12
16
immovable (immovable&&) = delete ;
13
17
immovable (const immovable&) = delete ;
14
18
~immovable () = default ;
15
19
auto operator =(immovable&&) -> immovable& = delete ;
16
20
auto operator =(const immovable&) -> immovable& = delete ;
17
21
};
18
- } // namespace beman::execution26::detail
22
+
23
+ struct beman ::execution26::detail::virtual_immovable {
24
+ constexpr virtual_immovable () = default;
25
+ virtual_immovable (virtual_immovable&&) = delete ;
26
+ virtual_immovable (const virtual_immovable&) = delete ;
27
+ virtual ~virtual_immovable () = default ;
28
+ auto operator =(virtual_immovable&&) -> virtual_immovable& = delete ;
29
+ auto operator =(const virtual_immovable&) -> virtual_immovable& = delete ;
30
+ };
19
31
20
32
// ----------------------------------------------------------------------------
21
33
Original file line number Diff line number Diff line change 4
4
#ifndef INCLUDED_BEMAN_EXECUTION26_DETAIL_INPLACE_STOP_SOURCE
5
5
#define INCLUDED_BEMAN_EXECUTION26_DETAIL_INPLACE_STOP_SOURCE
6
6
7
+ #include < beman/execution26/detail/immovable.hpp>
7
8
#include < atomic>
8
9
#include < memory>
9
10
#include < mutex>
@@ -48,15 +49,8 @@ class beman::execution26::inplace_stop_token {
48
49
// ----------------------------------------------------------------------------
49
50
50
51
class beman ::execution26::inplace_stop_source {
51
- struct callback_base {
52
- callback_base () = default ;
53
- callback_base (callback_base const &) = delete ;
54
- callback_base (callback_base&&) = delete ;
55
- virtual ~callback_base () = default ;
56
- auto operator =(callback_base const &) -> callback_base& = delete ;
57
- auto operator =(callback_base&&) -> callback_base& = delete ;
58
-
59
- callback_base* next{};
52
+ struct callback_base : public ::beman::execution26::detail::virtual_immovable {
53
+ callback_base* next{};
60
54
virtual auto call () -> void = 0;
61
55
};
62
56
Original file line number Diff line number Diff line change @@ -28,13 +28,7 @@ class notifier : ::beman::execution26::detail::immovable {
28
28
29
29
private:
30
30
friend struct impls_for <::beman::execution26::detail::notify_t >;
31
- struct base {
32
- base () = default ;
33
- base (base const &) = default ;
34
- base (base&&) = default ;
35
- virtual ~base () = default ;
36
- auto operator =(base const &) -> base& = default ;
37
- auto operator =(base&&) -> base& = default ;
31
+ struct base : ::beman::execution26::detail::virtual_immovable {
38
32
base* next{};
39
33
virtual auto complete () -> void = 0;
40
34
};
Original file line number Diff line number Diff line change @@ -37,16 +37,13 @@ class run_loop {
37
37
return {this ->loop };
38
38
}
39
39
};
40
- struct opstate_base : ::beman::execution26::detail::immovable {
41
- opstate_base () = default ;
42
- opstate_base (opstate_base const &) = delete ;
43
- opstate_base (opstate_base&&) = delete ;
40
+
41
+ struct opstate_base : ::beman::execution26::detail::virtual_immovable {
44
42
virtual ~opstate_base () = default ;
45
- auto operator =(opstate_base const &) -> opstate_base& = delete ;
46
- auto operator =(opstate_base&&) -> opstate_base& = delete ;
47
43
opstate_base* next{};
48
44
virtual auto execute () noexcept -> void = 0;
49
45
};
46
+
50
47
template <typename Receiver>
51
48
struct opstate : opstate_base {
52
49
using operation_state_concept = ::beman::execution26::operation_state_t ;
You can’t perform that action at this time.
0 commit comments