在线文档教程
C++
应用 | Utilities

std::bit_or

STD:BIT[医]或

Defined in header
template< class T > struct bit_or;(until C++14)
template< class T = void > struct bit_or;(since C++14)

函数对象,用于执行按位或。有效呼叫operator|论类型T...

专门性

The standard library provides a specialization of std::bit_or when T is not specified, which leaves the parameter types and return type to be deduced. bit_or function object implementing x | y deducing argument and return types (class template specialization)bit_orfunction object implementing x | y deducing argument and return types (class template specialization)(since C++14)
bit_or<void>function object implementing x | y deducing argument and return types (class template specialization)

成员类型

TypeDefinition
result_type(deprecated in C++17)T
first_argument_type(deprecated in C++17)T
second_argument_type(deprecated in C++17)T

成员函数

operator()returns the result of bitwise OR of two arguments (public member function)

STD:BIT[医]或:操作员%28%29

T operator()( const T& lhs, const T& rhs ) const;(until C++14)
constexpr T operator()( const T& lhs, const T& rhs ) const;(since C++14)

返回按位或按位计算的结果。lhsrhs...

参数

lhs, rhs-values to compute bitwise OR of

返回值

结果lhs | rhs...

例外

%280%29

可能的实施

ConstT运算符%28%29%28 const T&LHS,Const T&RHS%29 Const{Ref LHSRHS;}

*。

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/实用程序/Functional/BIT[医]或