瀏覽代碼

Add missing noexcept

Kajetan Johannes Hammerle 1 天之前
父節點
當前提交
e735779e9e
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      modules/ToString.cppm

+ 5 - 4
modules/ToString.cppm

@@ -147,21 +147,22 @@ export namespace Core {
         String() noexcept : StringBase(data, N) {
         }
 
-        String(String&& other) : String(static_cast<const String&>(other)) {
+        String(String&& other) noexcept :
+            String(static_cast<const String&>(other)) {
         }
 
-        String(const String& other) : String() {
+        String(const String& other) noexcept : String() {
             clear();
             add(other);
         }
 
-        String& operator=(String&& other) {
+        String& operator=(String&& other) noexcept {
             clear();
             add(other);
             return *this;
         }
 
-        String& operator=(const String& other) {
+        String& operator=(const String& other) noexcept {
             clear();
             add(other);
             return *this;