Explorar o código

feat(vector): impl. operator=

greatbridf %!s(int64=2) %!d(string=hai) anos
pai
achega
5e5b8a16e0
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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)
         {