首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::logical_or<void>

Defined in header <functional>

template<> class logical_or<void>;

(since C++14)

std::logical_or<>std::logical_or并推导出参数和返回类型。

成员类型

Member type

Definition

is_transparent

/* unspecified */

成员函数

operator()

applies operator|| to lhs and rhs (public member function)

STD::逻辑[医]或<>::操作员%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 OR

返回值

结果std::forward<T>(lhs)||std::forward<U>(rhs)...

注记

成员类型is_transparent向调用方指示此函数对象是透明FunctionObject:它接受任意类型的参数,并使用完美的转发,这避免了在异构上下文中使用函数对象或使用rvalue参数时不必要的复制和转换。特别是模板函数,例如std::set::findstd::set::lower_bound在它们的Compare类型。

代码语言:txt
复制
 © cppreference.com

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

扫码关注腾讯云开发者

领取腾讯云代金券