throw invalid_argument("Path::operator[]");
}
-bool Path::operator==(const Path &p) const
+bool Path::operator==(const Path &other) const
{
#ifdef WIN32
- return !strcasecmp(path, p.path);
+ return strcasecmp(path, other.path)==0;
#else
- return path==p.path;
+ return path==other.path;
+#endif
+}
+
+bool Path::operator<(const Path &other) const
+{
+#ifdef WIN32
+ return strcasecmp(path, other.path)<0;
+#else
+ return path<other.path;
+#endif
+}
+
+bool Path::operator>(const Path &other) const
+{
+#ifdef WIN32
+ return strcasecmp(path, other.path)>0;
+#else
+ return path>other.path;
#endif
}
std::string operator[](int) const;
bool operator==(const Path &) const;
+ bool operator<(const Path &) const;
+ bool operator>(const Path &) const;
+ bool operator<=(const Path &other) const { return !(*this>other); }
+ bool operator>=(const Path &other) const { return !(*this<other); }
+ bool operator!=(const Path &other) const { return !(*this==other); }
+
Iterator begin() const;
Iterator end() const;
};