From 0aed2f0f868e2b5ec00b0ad77e037b77d40b9967 Mon Sep 17 00:00:00 2001 From: Federico Guerinoni Date: Sat, 5 Mar 2022 14:05:56 +0100 Subject: AK: Add reverse iterator as member --- AK/NonnullPtrVector.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'AK/NonnullPtrVector.h') diff --git a/AK/NonnullPtrVector.h b/AK/NonnullPtrVector.h index 728d37314d..c628196c1a 100644 --- a/AK/NonnullPtrVector.h +++ b/AK/NonnullPtrVector.h @@ -41,6 +41,11 @@ public: ALWAYS_INLINE constexpr Iterator end() { return Iterator::end(*this); } ALWAYS_INLINE constexpr ReverseIterator rend() { return ReverseIterator::rend(*this); } + ALWAYS_INLINE constexpr auto in_reverse() + { + return ReverseWrapper::in_reverse(*this); + } + ALWAYS_INLINE PtrType& ptr_at(size_t index) { return Base::at(index); } ALWAYS_INLINE const PtrType& ptr_at(size_t index) const { return Base::at(index); } -- cgit v1.2.3