std:: not_equal_to<void>
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Old binders and adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
定义于头文件
<functional>
|
||
|
template
<>
class not_equal_to < void > ; |
(C++14 起) | |
std:: not_equal_to < void > 是 std::not_equal_to 的特化版本,其参数和返回类型被自动推导。
目录 |
嵌套类型
| 嵌套类型 | 定义 |
is_transparent
|
未指定 |
成员函数
|
operator()
|
测试两个参数是否不相等
(公开成员函数) |
std::not_equal_to<void>:: operator()
|
template
<
class
T,
class
U
>
constexpr
auto
operator
(
)
(
T
&&
lhs, U
&&
rhs
)
const
|
||
返回 lhs 与 rhs 的不等比较结果。
参数
| lhs, rhs | - | 要比较的值 |
返回值
std:: forward < T > ( lhs ) ! = std:: forward < U > ( rhs ) 。
示例
#include <functional> int main() { constexpr int p = 0, q = 8; std::not_equal_to<> not_equal{}; static_assert(!not_equal(p, p)); static_assert(not_equal(p, q)); }