diff --git a/AK/NonnullRefPtrVector.h b/AK/NonnullRefPtrVector.h index a87a6086149..b2963910152 100644 --- a/AK/NonnullRefPtrVector.h +++ b/AK/NonnullRefPtrVector.h @@ -20,6 +20,15 @@ public: } using Base::size; + + using Iterator = VectorIterator; + Iterator begin() { return Iterator(*this, 0); } + Iterator end() { return Iterator(*this, size()); } + + using ConstIterator = ConstVectorIterator; + ConstIterator begin() const { return ConstIterator(*this, 0); } + ConstIterator end() const { return ConstIterator(*this, size()); } + T& at(int index) { return *Base::at(index); } const T& at(int index) const { return *Base::at(index); } T& operator[](int index) { return at(index); }