Skip to content

Commit 1789c9c

Browse files
committed
odb: make dbSetIterator<T>::operator* & operator-> const
Satisfy std::ranges Signed-off-by: Matt Liberty <[email protected]>
1 parent 78b5e97 commit 1789c9c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/odb/include/odb/dbSet.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class dbSetIterator
3434
bool operator==(const dbSetIterator<T>& it) const;
3535
bool operator!=(const dbSetIterator<T>& it) const;
3636

37-
T* operator*();
38-
T* operator->();
37+
T* operator*() const;
38+
T* operator->() const;
3939
dbSetIterator<T>& operator++();
4040
dbSetIterator<T> operator++(int);
4141

@@ -158,13 +158,13 @@ inline bool dbSetIterator<T>::operator!=(const dbSetIterator& it) const
158158
}
159159

160160
template <class T>
161-
inline T* dbSetIterator<T>::operator*()
161+
inline T* dbSetIterator<T>::operator*() const
162162
{
163163
return (T*) itr_->getObject(cur_);
164164
}
165165

166166
template <class T>
167-
inline T* dbSetIterator<T>::operator->()
167+
inline T* dbSetIterator<T>::operator->() const
168168
{
169169
return (T*) itr_->getObject(cur_);
170170
}

0 commit comments

Comments
 (0)