util/DereferenceIterator: fix operator- and operator+ return types

This commit is contained in:
Max Kellermann 2024-07-11 14:28:18 +02:00
parent cb9f3c1a5b
commit 3701378449
1 changed files with 4 additions and 4 deletions

View File

@ -53,8 +53,8 @@ public:
return *this;
}
constexpr auto &operator+(difference_type n) const noexcept {
return original + n;
constexpr auto operator+(difference_type n) const noexcept {
return DereferenceIterator{original + n};
}
constexpr auto &operator--() noexcept {
@ -73,8 +73,8 @@ public:
return *this;
}
constexpr auto &operator-(difference_type n) const noexcept {
return original - n;
constexpr auto operator-(difference_type n) const noexcept {
return DereferenceIterator{original - n};
}
constexpr bool operator==(const DereferenceIterator<IT,VT> &other) const noexcept {