Namespaces
Variants

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

From cppreference.net
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 进行比较。

< <= > >= != 运算符分别由 operator <=> operator == 自动合成。

(since C++20)

参数

rhs - 要比较的 directory_entry

返回值

1) true path ( ) == rhs. path ( ) 时成立, false 其他情况。
2) path ( ) ! = rhs. path ( ) 则返回 true ,否则返回 false
3) true path ( ) < rhs. path ( ) ,否则为 false
4) true path ( ) <= rhs. path ( ) 时成立,否则为 false
5) true path ( ) > rhs. path ( ) ,否则为 false
6) true path ( ) >= rhs. path ( ) ,否则为 false
7) path ( ) <=> rhs. path ( ) 的结果。

参见

返回该条目所引用的路径
(公开成员函数)