diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2022-12-14 13:35:30 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-12-14 20:58:13 +0300 |
commit | e6de36e1f9447c33447703b102146e0354ea6828 (patch) | |
tree | 87ba340d8aae1468b8dd8100574ba5cc49b23965 | |
parent | 254593cf0b8386b9c1ee189c19d8221f7de201f1 (diff) |
Add noexcept to move constructors and move assignment operators
-rw-r--r-- | bpkg/database.hxx | 3 | ||||
-rw-r--r-- | bpkg/package-skeleton.cxx | 4 | ||||
-rw-r--r-- | bpkg/package-skeleton.hxx | 4 | ||||
-rw-r--r-- | bpkg/pkg-build-collect.cxx | 2 | ||||
-rw-r--r-- | bpkg/pkg-build-collect.hxx | 2 |
5 files changed, 9 insertions, 6 deletions
diff --git a/bpkg/database.hxx b/bpkg/database.hxx index cfd2645..3887d99 100644 --- a/bpkg/database.hxx +++ b/bpkg/database.hxx @@ -158,6 +158,9 @@ namespace bpkg // Move-constructible but not move-assignable. // + // Note: noexcept is not specified since + // odb::sqlite::database(odb::sqlite::database&&) can throw. + // database (database&&); database& operator= (database&&) = delete; diff --git a/bpkg/package-skeleton.cxx b/bpkg/package-skeleton.cxx index 7b2a99e..c3015da 100644 --- a/bpkg/package-skeleton.cxx +++ b/bpkg/package-skeleton.cxx @@ -160,7 +160,7 @@ namespace bpkg } package_skeleton:: - package_skeleton (package_skeleton&& v) + package_skeleton (package_skeleton&& v) noexcept : package (move (v.package)), system (v.system), available (move (v.available)), @@ -194,7 +194,7 @@ namespace bpkg } package_skeleton& package_skeleton:: - operator= (package_skeleton&& v) + operator= (package_skeleton&& v) noexcept { if (this != &v) { diff --git a/bpkg/package-skeleton.hxx b/bpkg/package-skeleton.hxx index 9f76221..b2ed752 100644 --- a/bpkg/package-skeleton.hxx +++ b/bpkg/package-skeleton.hxx @@ -188,8 +188,8 @@ namespace bpkg // constructor has some special logic. // ~package_skeleton (); - package_skeleton (package_skeleton&&); - package_skeleton& operator= (package_skeleton&&); + package_skeleton (package_skeleton&&) noexcept; + package_skeleton& operator= (package_skeleton&&) noexcept; package_skeleton (const package_skeleton&); package_skeleton& operator= (const package_skeleton&) = delete; diff --git a/bpkg/pkg-build-collect.cxx b/bpkg/pkg-build-collect.cxx index 244267b..12db3ba 100644 --- a/bpkg/pkg-build-collect.cxx +++ b/bpkg/pkg-build-collect.cxx @@ -978,7 +978,7 @@ namespace bpkg } build_packages& build_packages:: - operator= (build_packages&& v) + operator= (build_packages&& v) noexcept (false) { clear (); diff --git a/bpkg/pkg-build-collect.hxx b/bpkg/pkg-build-collect.hxx index 6451f19..e47d9fa 100644 --- a/bpkg/pkg-build-collect.hxx +++ b/bpkg/pkg-build-collect.hxx @@ -1056,7 +1056,7 @@ namespace bpkg build_packages& operator= (const build_packages&) = delete; build_packages& - operator= (build_packages&&); + operator= (build_packages&&) noexcept (false); // Pre-enter a build_package without an action. No entry for this package // may already exists. |