ソースを参照

Update vector.hpp

blueloveTH 1 年間 前
コミット
dfd0d0532b
1 ファイル変更1 行追加7 行削除
  1. 1 7
      include/pocketpy/common/vector.hpp

+ 1 - 7
include/pocketpy/common/vector.hpp

@@ -336,13 +336,7 @@ struct small_vector {
         other._capacity = other._begin + N;
     }
 
-    small_vector& operator= (const small_vector& other) noexcept {
-        if(this != &other) {
-            ~small_vector();
-            ::new (this) small_vector(other);
-        }
-        return *this;
-    }
+    small_vector& operator= (const small_vector& other) = delete;
 
     small_vector& operator= (small_vector&& other) noexcept {
         if(this != &other) {