std::logical_not
Defined in header <functional> | | |
|---|---|---|
template< class T > struct logical_not; | | (until C++14) |
template< class T = void > struct logical_not; | | (since C++14) |
函数对象,用于执行逻辑而不是%28逻辑否定%29。有效呼叫operator!类型T...
专门性
The standard library provides a specialization of std::logical_not when T is not specified, which leaves the parameter types and return type to be deduced. logical_not<void> function object implementing !x deducing argument and return types (class template specialization) | logical_not<void> | function object implementing !x deducing argument and return types (class template specialization) | (since C++14) |
|---|---|---|---|
logical_not<void> | function object implementing !x deducing argument and return types (class template specialization) |
成员类型
Type | Definition |
|---|---|
result_type(deprecated in C++17) | bool |
argument_type(deprecated in C++17) | T |
成员函数
operator() | returns the logical NOT of the argument (public member function) |
|---|
STD::逻辑[医]否::操作员%28%29
bool operator()( const T& arg ) const; | | (until C++14) |
|---|---|---|
constexpr bool operator()( const T& arg ) const; | | (since C++14) |
返回逻辑非arg...
参数
arg | - | value to compute logical NOT of |
|---|
返回值
结果!arg...
例外
%280%29
可能的实施
Const bool运算符%28%29%28 const T&Arg%29 const{返回%21 arg;}
*。
© cppreference.com在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

