std::logical_or
STD::逻辑[医]或
Defined in header | | |
---|---|---|
template< class T > struct logical_or; | | (until C++14) |
template< class T = void > struct logical_or; | | (since C++14) |
函数对象,用于执行逻辑OR%28逻辑分离%29。有效呼叫operator||
论类型T
...
专门性
The standard library provides a specialization of std::logical_or when T is not specified, which leaves the parameter types and return type to be deduced. logical_or | logical_or | function object implementing x || y deducing argument and return types (class template specialization) | (since C++14) |
---|---|---|---|
logical_or<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() | returns the logical OR of the two arguments (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 compute logical OR of |
---|
返回值
结果lhs || rhs
...
例外
%280%29
可能的实施
Const T&LHS,Const T&RHS%29 Const{返回LHSRHS;}
*。
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。