Polymorphic wrapper for executors.
| 48 | |
| 49 | /// Polymorphic wrapper for executors. |
| 50 | class executor |
| 51 | { |
| 52 | public: |
| 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() |
nothing calls this directly
no test coverage detected