reader_concurrency_semaphore: inactive_read_handle: mark methods noexcept

All are trivially noexcept.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
Message-Id: <20210204113327.1027792-1-bhalevy@scylladb.com>
This commit is contained in:
Benny Halevy
2021-02-04 13:33:27 +02:00
committed by Avi Kivity
parent ba4b8dd6e5
commit 338c190842

View File

@@ -69,19 +69,20 @@ public:
friend class reader_concurrency_semaphore;
explicit inactive_read_handle(reader_concurrency_semaphore& sem, uint64_t id)
explicit inactive_read_handle(reader_concurrency_semaphore& sem, uint64_t id) noexcept
: _sem(&sem), _id(id) {
}
public:
inactive_read_handle() = default;
inactive_read_handle(inactive_read_handle&& o) : _sem(std::exchange(o._sem, nullptr)), _id(std::exchange(o._id, 0)) {
inactive_read_handle(inactive_read_handle&& o) noexcept
: _sem(std::exchange(o._sem, nullptr)), _id(std::exchange(o._id, 0)) {
}
inactive_read_handle& operator=(inactive_read_handle&& o) {
inactive_read_handle& operator=(inactive_read_handle&& o) noexcept {
_sem = std::exchange(o._sem, nullptr);
_id = std::exchange(o._id, 0);
return *this;
}
explicit operator bool() const {
explicit operator bool() const noexcept {
return bool(_id);
}
};