Created on 2016-08-03.00:00:00 last changed 98 months ago
Proposed resolution:
This wording is relative to N4606.
In [fs.class.directory_entry] synopsis, edit as follows:
namespace std::filesystem { class directory_entry { public: […]bool operator< (const directory_entry& rhs) const noexcept; bool operator==(const directory_entry& rhs) const noexcept; bool operator!=(const directory_entry& rhs) const noexcept; bool operator<=(const directory_entry& rhs) const noexcept; bool operator> (const directory_entry& rhs) const noexcept; bool operator>=(const directory_entry& rhs) const noexcept;private: path pathobject; // exposition only }; bool operator< (const directory_entry& lhs, const directory_entry& rhs) noexcept; bool operator==(const directory_entry& lhs, const directory_entry& rhs) noexcept; bool operator!=(const directory_entry& lhs, const directory_entry& rhs) noexcept; bool operator<=(const directory_entry& lhs, const directory_entry& rhs) noexcept; bool operator> (const directory_entry& lhs, const directory_entry& rhs) noexcept; bool operator>=(const directory_entry& lhs, const directory_entry& rhs) noexcept; }
In [fs.dir.entry.obs]/6-11, edit as follows:
bool operator==(const directory_entry& lhs, const directory_entry& rhs)constnoexcept;-6- Returns:
pathobjectlhs.path() == rhs.pathobjectpath().bool operator!=(const directory_entry& lhs, const directory_entry& rhs)constnoexcept;-7- Returns::
pathobjectlhs.path() != rhs.pathobjectpath().bool operator< (const directory_entry& lhs, const directory_entry& rhs)constnoexcept;-8- Returns::
pathobjectlhs.path() < rhs.pathobjectpath().bool operator<<=(const directory_entry& lhs, const directory_entry& rhs)constnoexcept;-9- Returns::
pathobjectlhs.path() <= rhs.pathobjectpath().bool operator> (const directory_entry& lhs, const directory_entry& rhs)constnoexcept;-10- Returns::
pathobjectlhs.path() > rhs.pathobjectpath().bool operator>=(const directory_entry& lhs, const directory_entry& rhs)constnoexcept;-11- Returns::
pathobjectlhs.path() >= rhs.pathobjectpath().
[ 2016-10 Telecon ]
This (comparing a path with a directory_entry) works today w/o any changes. Closing as NAD.
[ 2016-10-05 Ville provides concrete wording ]
[ 2016-08 Chicago ]
Wed PM: Priority 2
The comparison operators for directory_entry are member functions ([fs.dir.entry.obs]).
That means that a directory_entry can be compared with a path, but a path cannot be compared with a directory_entry, because the left-hand side is not subject to conversions. This seems unfortunate. Note that the comparisons for path are non-members ([fs.path.nonmember]). The meta-p/r is to turn the directory_entry comparisons into non-member functions.History | |||
---|---|---|---|
Date | User | Action | Args |
2016-10-10 20:46:47 | admin | set | messages: + msg8554 |
2016-10-10 20:46:47 | admin | set | status: new -> nad |
2016-10-06 19:11:58 | admin | set | messages: + msg8541 |
2016-10-06 19:11:58 | admin | set | messages: + msg8540 |
2016-08-04 03:06:12 | admin | set | messages: + msg8392 |
2016-08-03 00:00:00 | admin | create |