MCPcopy Create free account
hub / github.com/boostorg/asio / executor

Class executor

include/boost/asio/executor.hpp:50–350  ·  view source on GitHub ↗

Polymorphic wrapper for executors.

Source from the content-addressed store, hash-verified

48
49/// Polymorphic wrapper for executors.
50class executor
51{
52public:
53 /// Default constructor.
54 executor() noexcept
55 : impl_(0)
56 {
57 }
58
59 /// Construct from nullptr.
60 executor(nullptr_t) noexcept
61 : impl_(0)
62 {
63 }
64
65 /// Copy constructor.
66 executor(const executor& other) noexcept
67 : impl_(other.clone())
68 {
69 }
70
71 /// Move constructor.
72 executor(executor&& other) noexcept
73 : impl_(other.impl_)
74 {
75 other.impl_ = 0;
76 }
77
78 /// Construct a polymorphic wrapper for the specified executor.
79 template <typename Executor>
80 executor(Executor e);
81
82 /// Construct a polymorphic executor that points to the same target as
83 /// another polymorphic executor.
84 executor(std::nothrow_t, const executor& other) noexcept
85 : impl_(other.clone())
86 {
87 }
88
89 /// Construct a polymorphic executor that moves the target from another
90 /// polymorphic executor.
91 executor(std::nothrow_t, executor&& other) noexcept
92 : impl_(other.impl_)
93 {
94 other.impl_ = 0;
95 }
96
97 /// Construct a polymorphic wrapper for the specified executor.
98 template <typename Executor>
99 executor(std::nothrow_t, Executor e) noexcept;
100
101 /// Allocator-aware constructor to create a polymorphic wrapper for the
102 /// specified executor.
103 template <typename Executor, typename Allocator>
104 executor(allocator_arg_t, const Allocator& a, Executor e);
105
106 /// Destructor.
107 ~executor()

Callers

nothing calls this directly

Calls 4

destroyFunction · 0.70
cloneMethod · 0.45
contextMethod · 0.45
target_typeMethod · 0.45

Tested by

no test coverage detected