mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-07-22 03:44:27 +08:00
refs #71, added three-way comparison to directory_entry
This commit is contained in:
parent
ab3cb84648
commit
3225d122ac
@ -770,6 +770,9 @@ public:
|
|||||||
uintmax_t hard_link_count(std::error_code& ec) const noexcept;
|
uintmax_t hard_link_count(std::error_code& ec) const noexcept;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef GHC_HAS_THREEWAY_COMP
|
||||||
|
std::strong_ordering operator<=>(const directory_entry& rhs) const noexcept;
|
||||||
|
#endif
|
||||||
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;
|
||||||
@ -5084,6 +5087,13 @@ GHC_INLINE file_status directory_entry::symlink_status(std::error_code& ec) cons
|
|||||||
return filesystem::symlink_status(path(), ec);
|
return filesystem::symlink_status(path(), ec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef GHC_HAS_THREEWAY_COMP
|
||||||
|
GHC_INLINE std::strong_ordering directory_entry::operator<=>(const directory_entry& rhs) const noexcept
|
||||||
|
{
|
||||||
|
return _path <=> rhs._path;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
GHC_INLINE bool directory_entry::operator<(const directory_entry& rhs) const noexcept
|
GHC_INLINE bool directory_entry::operator<(const directory_entry& rhs) const noexcept
|
||||||
{
|
{
|
||||||
return _path < rhs._path;
|
return _path < rhs._path;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user