operator==,!=,<,<=,>,>= (std::experimental::filesystem::path)
|
bool
operator
==
(
const
path
&
lhs,
const
path
&
rhs
)
;
|
(1) | (文件系统 TS) |
|
bool
operator
!
=
(
const
path
&
lhs,
const
path
&
rhs
)
;
|
(2) | (文件系统 TS) |
|
bool
operator
<
(
const
path
&
lhs,
const
path
&
rhs
)
;
|
(3) | (文件系统 TS) |
|
bool
operator
<=
(
const
path
&
lhs,
const
path
&
rhs
)
;
|
(4) | (文件系统 TS) |
|
bool
operator
>
(
const
path
&
lhs,
const
path
&
rhs
)
;
|
(5) | (文件系统 TS) |
|
bool
operator
>=
(
const
path
&
lhs,
const
path
&
rhs
)
;
|
(6) | (文件系统 TS) |
按字典序比较两个路径。
目录 |
参数
| lhs, rhs | - | 要比较的路径 |
返回值
true 表示对应比较结果为真, false 则表示其他情况。
异常
备注
路径相等性和等价性具有不同的语义。
在相等性判断中,如通过
operator==
所确定的,仅比较词法表示。因此,
path
(
"a"
)
==
path
(
"b"
)
永远不会为
true
。
在等价性判断中,如通过 equivalent() 所确定的,会检查两个路径是否 解析 为同一文件系统对象。因此当路径解析为同一文件时, equivalent ( "a" , "b" ) 将返回 true 。
参见
|
按字典序比较两个路径的词汇表示
(公开成员函数) |