std::filesystem::directory_entry::operator==,!=,<,<=,>,>=,<=>

来自cppreference.com
 
 
 
 
bool operator==(const directory_entry& rhs )constnoexcept;
(1) (C++17 起)
bool operator!=(const directory_entry& rhs )constnoexcept;
(2) (C++17 起)
(C++20 前)
bool operator<(const directory_entry& rhs )constnoexcept;
(3) (C++17 起)
(C++20 前)
bool operator<=(const directory_entry& rhs )constnoexcept;
(4) (C++17 起)
(C++20 前)
bool operator>(const directory_entry& rhs )constnoexcept;
(5) (C++17 起)
(C++20 前)
bool operator>=(const directory_entry& rhs )constnoexcept;
(6) (C++17 起)
(C++20 前)
std::strong_ordering operator<=>(const directory_entry& rhs )constnoexcept;
(7) (C++20 起)

与目录条目 rhs 比较路径。

<<=>>=!= 运算符分别从 operator<=>operator==合成

(C++20 起)

[编辑]参数

rhs - 要比较的 directory_entry

[编辑]返回值

1)path()== rhs.path() 则为 true,否则为 false
2)path()!= rhs.path() 则为 true,否则为 false
3)path()< rhs.path() 则为 true,否则为 false
4)path()<= rhs.path() 则为 true,否则为 false
5)path()> rhs.path() 则为 true,否则为 false
6)path()>= rhs.path() 则为 true,否则为 false
7)path()<=> rhs.path() 的结果。

[编辑]参阅

返回该目录项代表的路径
(公开成员函数)[编辑]
close