From dfd0d0532bde198836c2bf0906fbac35313fb57a Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Thu, 6 Jun 2024 23:50:49 +0800 Subject: [PATCH] Update vector.hpp --- include/pocketpy/common/vector.hpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/include/pocketpy/common/vector.hpp b/include/pocketpy/common/vector.hpp index 878c8b74..a4e64939 100644 --- a/include/pocketpy/common/vector.hpp +++ b/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) {