std::not_equal_to
Defined in header <functional> | | |
|---|---|---|
template< class T > struct not_equal_to; | | (until C++14) |
template< class T = void > struct not_equal_to; | | (since C++14) |
用于执行比较的函数对象。除非是专门的,否则调用operator!=论类型T...
专门性
The standard library provides a specialization of std::not_equal_to when T is not specified, which leaves the parameter types and return type to be deduced. not_equal_to<void> function object implementing x != y deducing argument and return types (class template specialization) | not_equal_to<void> | function object implementing x != y deducing argument and return types (class template specialization) | (since C++14) |
|---|---|---|---|
not_equal_to<void> | function object implementing x != y deducing argument and return types (class template specialization) |
成员类型
type | definition |
|---|---|
result_type(deprecated in C++17) | bool |
first_argument_type(deprecated in C++17) | T |
second_argument_type(deprecated in C++17) | T |
成员函数
operator() | checks if the arguments are not equal (public member function) |
|---|
STD:不[医]平等[医]致:操作员%28%29
bool operator()( const T& lhs, const T& rhs ) const; | | (until C++14) |
|---|---|---|
constexpr bool operator()( const T& lhs, const T& rhs ) const; | | (since C++14) |
检查是否lhs是不平等到rhs...
参数
lhs, rhs | - | values to compare |
|---|
返回值
true如果lhs != rhs,,,false否则。
例外
%280%29
可能的实施
ConstT&rhs%29 const{返回lhs%21=rhs;}
*。
© cppreference.com在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

