Mark non-throwing functions as noexcept when possible and mark waker as
final since we don't expect user to derive from it.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I9b2a4c4376b2a96e7238d93e2ad60b1f55317dc2
class waiter;
class wait_queue;
-class waker {
+class waker final {
friend waiter;
public:
- waker(const waker&) = default;
- waker(waker&&) = default;
- waker& operator=(const waker& other) = default;
- waker& operator=(waker&& other) = default;
+ waker(const waker&) noexcept = default;
+ waker(waker&&) noexcept = default;
+ waker& operator=(const waker& other) noexcept = default;
+ waker& operator=(waker&& other) noexcept = default;
void wake();
~waker() = default;
private:
- waker(int32_t& state) : _state{ state }
+ explicit waker(int32_t& state) noexcept : _state{ state }
{
}