std::filesystem::directory_entry::operator==,!=,<,<=,>,>=,<=>
来自 cppreference.cn
< cpp | filesystem | directory entry
bool operator==( const directory_entry& rhs ) const noexcept; |
(1) | (C++17 起) |
bool operator!=( const directory_entry& rhs ) const noexcept; |
(2) | (C++17 起) (C++20 前) |
bool operator<( const directory_entry& rhs ) const noexcept; |
(3) | (C++17 起) (C++20 前) |
bool operator<=( const directory_entry& rhs ) const noexcept; |
(4) | (C++17 起) (C++20 前) |
bool operator>( const directory_entry& rhs ) const noexcept; |
(5) | (C++17 起) (C++20 前) |
bool operator>=( const directory_entry& rhs ) const noexcept; |
(6) | (C++17 起) (C++20 前) |
std::strong_ordering operator<=>( const directory_entry& rhs ) const noexcept; |
(7) | (C++20 起) |
将路径与目录项 rhs 进行比较。
|
(C++20 起) |
[编辑] 参数
rhs | - | 要比较的目录项 |
[编辑] 返回值
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() 的结果。
[编辑] 参见
返回条目引用的路径 (公开成员函数) |