From e5ffc1686fae61af6ef726ede4bdc4e4674b803e Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 9 Feb 2023 23:06:49 +0200 Subject: [PATCH] BAN: Vector::const_iterator now uses const T* as underlying type --- BAN/include/BAN/Vector.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BAN/include/BAN/Vector.h b/BAN/include/BAN/Vector.h index 287fb10ea..01ab2e726 100644 --- a/BAN/include/BAN/Vector.h +++ b/BAN/include/BAN/Vector.h @@ -81,6 +81,7 @@ namespace BAN { public: using value_type = T; + using data_type = maybe_const_t; public: VectorIterator() = default; @@ -107,10 +108,10 @@ namespace BAN bool operator!=(const VectorIterator& other) const { return !(*this == other); } private: - VectorIterator(T* data) : m_data(data) { } + VectorIterator(data_type* data) : m_data(data) { } private: - T* m_data = nullptr; + data_type* m_data = nullptr; friend class Vector; friend class VectorIterator;