std::logical_not
STD::逻辑[医]不
Defined in header | | |
---|---|---|
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 | logical_not | 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。