Browse Source

feat(vector): add copy constructor

greatbridf 2 years ago
parent
commit
1e81695c9a
1 changed files with 5 additions and 0 deletions
  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);