Browse Source

feat(vector): impl. operator=

greatbridf 2 năm trước cách đây
mục cha
commit
5e5b8a16e0
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      include/types/vector.hpp

+ 6 - 0
include/types/vector.hpp

@@ -40,6 +40,12 @@ public:
         {
         }
 
+        iterator& operator=(const iterator& iter)
+        {
+            p = iter.p;
+            return *this;
+        }
+
         explicit iterator(Pointer p) noexcept
             : p(p)
         {