From 5fef9aadd206dce1d0faa984e66a0c3eb12154dd Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 14 Dec 2022 19:36:20 +0300 Subject: Add noexcept to move constructors and move assignment operators --- odb/details/transfer-ptr.hxx | 2 +- odb/details/unique-ptr.hxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'odb/details') diff --git a/odb/details/transfer-ptr.hxx b/odb/details/transfer-ptr.hxx index 2ee0752..4b63df6 100644 --- a/odb/details/transfer-ptr.hxx +++ b/odb/details/transfer-ptr.hxx @@ -49,7 +49,7 @@ namespace odb transfer_ptr& operator= (const transfer_ptr&); public: - transfer_ptr (transfer_ptr&& p): p_ (p.transfer ()) {} + transfer_ptr (transfer_ptr&& p) noexcept: p_ (p.transfer ()) {} #endif ~transfer_ptr () {delete p_;} diff --git a/odb/details/unique-ptr.hxx b/odb/details/unique-ptr.hxx index 6663c30..06b2c76 100644 --- a/odb/details/unique-ptr.hxx +++ b/odb/details/unique-ptr.hxx @@ -22,8 +22,8 @@ namespace odb ~unique_ptr () {delete p_;} #ifdef ODB_CXX11 - unique_ptr (unique_ptr&& p): p_ (p.p_) {p.p_ = 0;} - unique_ptr& operator= (unique_ptr&& p) + unique_ptr (unique_ptr&& p) noexcept: p_ (p.p_) {p.p_ = 0;} + unique_ptr& operator= (unique_ptr&& p) noexcept { if (this != &p) { -- cgit v1.1