diff options
author | Rose <gfunni234@gmail.com> | 2024-08-19 17:00:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-08-19 19:10:34 (GMT) |
commit | 873b8244f06392e6a8b1541cb1a9eff719868c07 (patch) | |
tree | 38829cc7baa3d30ff64848f8ce8dc6548cbf9e77 | |
parent | 8fae37d99fb3a27c40cd2f5271b92e3f99c3dcd6 (diff) | |
download | CMake-873b8244f06392e6a8b1541cb1a9eff719868c07.zip CMake-873b8244f06392e6a8b1541cb1a9eff719868c07.tar.gz CMake-873b8244f06392e6a8b1541cb1a9eff719868c07.tar.bz2 |
String: Make swap method noexcept
There is no reason why it should not be `noexcept`.
`std::swap` cannot have any exceptions or handle any.
-rw-r--r-- | Source/cmString.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmString.hxx b/Source/cmString.hxx index 1994c2c..5e1b524 100644 --- a/Source/cmString.hxx +++ b/Source/cmString.hxx @@ -518,7 +518,7 @@ public: *this = std::move(s); } - void swap(String& other) + void swap(String& other) noexcept { std::swap(this->string_, other.string_); std::swap(this->view_, other.view_); |