diff --git a/container/ArrayList.h b/container/ArrayList.h index 9f5e76de..bda60433 100644 --- a/container/ArrayList.h +++ b/container/ArrayList.h @@ -116,7 +116,11 @@ public: return tmp; } - T operator*() { + T& operator*() { + return *value; + } + + const T& operator*() const { return *value; } @@ -124,12 +128,13 @@ public: return value; } - const T *operator->() const{ + const T *operator->() const { return value; } + //SHOULDDO this should be implemented as non-member - bool operator==(const typename ArrayList::Iterator& other) const{ + bool operator==(const typename ArrayList::Iterator& other) const { return (value == other.value); }