1
0
Эх сурвалжийг харах

String: Make swap method noexcept

There is no reason why it should not be `noexcept`.
`std::swap` cannot have any exceptions or handle any.
Rose 1 жил өмнө
parent
commit
873b8244f0
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      Source/cmString.hxx

+ 1 - 1
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_);