refs #624 Swap functions, move constructors, and move assignment operators should all be noexcept where possible.

This commit is contained in:
Mathew Sutcliffe
2016-03-21 01:24:43 +00:00
parent b33781717e
commit 91494ea2e5
10 changed files with 37 additions and 36 deletions

View File

@@ -354,10 +354,10 @@ namespace BlackMisc
BatchGuard &operator =(const BatchGuard &) = delete;
//! Move constructor.
BatchGuard(BatchGuard &&other) : m_page(other.m_page) { other.m_page = nullptr; }
BatchGuard(BatchGuard &&other) noexcept : m_page(other.m_page) { other.m_page = nullptr; }
//! Move assignment operator.
BatchGuard &operator =(BatchGuard &&other) { std::swap(m_page, other.m_page); return *this; }
BatchGuard &operator =(BatchGuard &&other) noexcept { std::swap(m_page, other.m_page); return *this; }
private:
friend class CValueCache;