std::bit_or<void>
Defined in header <functional> | | |
|---|---|---|
template<> class bit_or<void>; | | (since C++14) |
std::bit_or<>是std::bit_or并推导出参数和返回类型。
成员类型
Member type | Definition |
|---|---|
is_transparent | /* unspecified */ |
成员函数
operator() | applies operator| to lhs and rhs (public member function) |
|---|
STD:BIT[医]或<>::操作员%28%29
template< class T, class U> constexpr auto operator()( T&& lhs, U&& rhs ) const -> decltype(std::forward<T>(lhs) | std::forward<U>(rhs)); | | |
|---|
返回std::forward<T>(lhs)|std::forward<U>(rhs)...
参数
lhs, rhs | - | values to compute bitwise OR for |
|---|
返回值
结果std::forward<T>(lhs)|std::forward<U>(rhs)...
注记
成员类型is_transparent向调用方指示此函数对象是透明FunctionObject:它接受任意类型的参数,并使用完美的转发,这避免了在异构上下文中使用函数对象或使用rvalue参数时不必要的复制和转换。特别是模板函数,例如std::set::find和std::set::lower_bound在它们的Compare类型。
例
© cppreference.com在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

