Преглед на файлове

feat(vector): add copy constructor

greatbridf преди 2 години
родител
ревизия
1e81695c9a
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      include/types/vector.hpp

+ 5 - 0
include/types/vector.hpp

@@ -154,6 +154,11 @@ public:
         return *this;
     }
 
+    vector& operator=(const vector& arr)
+    {
+        return operator=(vector(arr));
+    }
+
     ~vector() noexcept
     {
         resize(0);