add path equality checks

master
Daniel Kolesa 2018-05-05 21:58:23 +02:00
parent 3bdb789b7a
commit 648273747a
1 changed files with 10 additions and 0 deletions

View File

@ -1118,6 +1118,16 @@ inline path operator+(path const &p1, path const &p2) {
return p1.concat(p2);
}
/** @brief Checks if two paths are the same. */
inline bool operator==(path const &p1, path const &p2) {
return (p1.string() == p2.string());
}
/** @brief Checks if two paths are not the same. */
inline bool operator!=(path const &p1, path const &p2) {
return !(p1 == p2);
}
namespace detail {
struct path_range: input_range<path_range> {
using range_category = forward_range_tag;