diff options
| author | Chongyun Lee <licy183@termux.dev> | 2024-08-15 21:31:24 +0800 |
|---|---|---|
| committer | Chongyun Lee <45286352+licy183@users.noreply.github.com> | 2024-08-15 21:31:24 +0800 |
| commit | b4488583424b33f51cb031562a9e8df820ffda23 (patch) | |
| tree | 9423cedf42fd6c346afebdd249809afe4bb01560 /apt-pkg | |
| parent | accc2f202eabfe472ceae37d9e4f4431a8cc298f (diff) | |
Fix compilation error with clang/libc++ 18
Diffstat (limited to 'apt-pkg')
| -rw-r--r-- | apt-pkg/cacheset.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h index 5dbb9bf08..1c67a65d6 100644 --- a/apt-pkg/cacheset.h +++ b/apt-pkg/cacheset.h @@ -218,11 +218,11 @@ public: operator container_iterator(void) const { return _iter; } inline iterator_type& operator++() { ++_iter; return static_cast<iterator_type&>(*this); } inline iterator_type operator++(int) { iterator_type tmp(*this); operator++(); return tmp; } - inline iterator_type operator+(typename container_iterator::difference_type const &n) { return iterator_type(_iter + n); } + inline iterator_type operator+(typename container_iterator::difference_type const &n) const { return iterator_type(_iter + n); } inline iterator_type operator+=(typename container_iterator::difference_type const &n) { _iter += n; return static_cast<iterator_type&>(*this); } inline iterator_type& operator--() { --_iter;; return static_cast<iterator_type&>(*this); } inline iterator_type operator--(int) { iterator_type tmp(*this); operator--(); return tmp; } - inline iterator_type operator-(typename container_iterator::difference_type const &n) { return iterator_type(_iter - n); } + inline iterator_type operator-(typename container_iterator::difference_type const &n) const { return iterator_type(_iter - n); } inline typename container_iterator::difference_type operator-(iterator_type const &b) { return (_iter - b._iter); } inline iterator_type operator-=(typename container_iterator::difference_type const &n) { _iter -= n; return static_cast<iterator_type&>(*this); } inline bool operator!=(iterator_type const &i) const { return _iter != i._iter; } |
