std::logical_or
来自cppreference.com
                    
                                        
                    < cpp | utility | functional
                    
                                                            
                    |   定义于头文件  <functional>
  | 
||
|   template< class T > struct logical_or;  | 
(C++14 前) | |
|   template< class T = void > struct logical_or;  | 
(C++14 起) | |
实现逻辑或(逻辑析取)的函数对象。等效地调用类型 T 上的 operator|| 。
特化
| 
 标准库提供  
  | 
(C++14 起) | 
成员类型
  | 
(C++20 前) | ||||||||||
成员函数
|    operator()  | 
  返回二个参数的逻辑或  (公开成员函数)  | 
std::logical_or::operator()
|   bool operator()( const T& lhs, const T& rhs ) const;  | 
(C++14 前) | |
|   constexpr bool operator()( const T& lhs, const T& rhs ) const;  | 
(C++14 起) | |
返回 lhs 和 rhs 的逻辑或。
参数
| lhs, rhs | - | 要计算其逻辑或的值 | 
返回值
lhs || rhs 的结果。
异常
可能抛出实现定义的异常。
可能的实现
constexpr bool operator()(const T &lhs, const T &rhs) const { return lhs || rhs; }  |