#include "macros.hpp"
-#include <stdbool.h>
+#include <functional>
#include <stdint.h>
#include <urcu/wfstack.h>
public:
waker(const waker&) = default;
waker(waker&&) = default;
- waker& operator=(const waker& other)
- {
- _state = other._state;
- return *this;
- }
- waker& operator=(waker&& other)
- {
- _state = other._state;
- return *this;
- }
+ waker& operator=(const waker& other) = default;
+ waker& operator=(waker&& other) = default;
void wake();
{
}
- int32_t& _state;
+ std::reference_wrapper<int32_t> _state;
};
class waiter final {