Add missing const on comparison operators

This is detected as an error in C++20 (spaceship) in clang 14, since the operators become ambiguous against reversed candidates.
This commit is contained in:
Ed Catmur
2022-03-29 11:48:40 +01:00
committed by GitHub
parent db44baba88
commit b99c41f494
+2 -2
View File
@@ -68,11 +68,11 @@ public:
}
}
bool operator==( directory_iterator const& other) {
bool operator==( directory_iterator const& other) const {
return i_ == other.i_;
}
bool operator!=( directory_iterator const& other) {
bool operator!=( directory_iterator const& other) const {
return i_ != other.i_;
}