mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
Move comparison operator out of class
This commit is contained in:
@@ -101,14 +101,15 @@ public:
|
||||
return iter;
|
||||
}
|
||||
|
||||
constexpr bool operator==(const Iterator &other) const
|
||||
// comparing iterators from different containers is undefined behavior in C++ standard library
|
||||
friend constexpr bool operator==(const Iterator &left, const Iterator &right)
|
||||
{
|
||||
return (*(*this) == *other);
|
||||
return (*left == *right);
|
||||
}
|
||||
|
||||
constexpr bool operator!=(const Iterator &other) const
|
||||
friend constexpr bool operator!=(const Iterator &left, const Iterator &right)
|
||||
{
|
||||
return !(*this == other);
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user