aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-12-14 19:52:19 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-12-14 19:55:10 +0300
commitecaa374ec46c2d60c4a4273e6e2b8d0d342af4c5 (patch)
tree2a6408e5f9a33b904c74e427326bebcb1c9ffe45
parentadb5186a59a19581a3c34fb00bdb7cf1907bf796 (diff)
Add noexcept to move constructors and move assignment operators
-rw-r--r--odb/mssql/auto-handle.hxx4
-rw-r--r--odb/mssql/database.hxx3
2 files changed, 5 insertions, 2 deletions
diff --git a/odb/mssql/auto-handle.hxx b/odb/mssql/auto-handle.hxx
index 6b15e73..f6934e4 100644
--- a/odb/mssql/auto-handle.hxx
+++ b/odb/mssql/auto-handle.hxx
@@ -64,8 +64,8 @@ namespace odb
}
#ifdef ODB_CXX11
- auto_handle (auto_handle&& ah): h_ (ah.release ()) {}
- auto_handle& operator= (auto_handle&& ah)
+ auto_handle (auto_handle&& ah) noexcept: h_ (ah.release ()) {}
+ auto_handle& operator= (auto_handle&& ah) noexcept
{
if (this != &ah)
reset (ah.release ());
diff --git a/odb/mssql/database.hxx b/odb/mssql/database.hxx
index 8ca74f9..5367bc5 100644
--- a/odb/mssql/database.hxx
+++ b/odb/mssql/database.hxx
@@ -139,6 +139,9 @@ namespace odb
// Move-constructible but not move-assignable.
//
+ // Note: noexcept is not specified since odb::database(odb::database&&)
+ // can throw.
+ //
#ifdef ODB_CXX11
database (database&&);
#endif