IteratorUtil: Fix missing constexpr on getIndex()

This commit is contained in:
Léo Lam 2022-07-01 17:01:27 +02:00
parent 0912686d9b
commit a58231b44a
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
1 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ public:
constexpr ElementProxy(Container& container, int index)
: mIndex(index), mContainer(container) {}
int getIndex() const { return mIndex; }
constexpr int getIndex() const { return mIndex; }
constexpr decltype(auto) get() const { return mContainer[mIndex]; }
constexpr decltype(auto) operator*() const { return get(); }
constexpr auto* operator->() const { return &get(); }
@ -83,7 +83,7 @@ public:
constexpr bool operator==(Iterator rhs) const { return mIndex == rhs.mIndex; }
constexpr bool operator!=(Iterator rhs) const { return !operator==(rhs); }
int getIndex() const { return mIndex; }
constexpr int getIndex() const { return mIndex; }
constexpr ElementProxy operator*() const { return ElementProxy(mContainer, mIndex); }
constexpr Iterator& operator++() {