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

std::multiplies

Defined in header <functional>

?

?

template< class T > struct multiplies;

?

(until C++14)

template< class T = void > struct multiplies;

?

(since C++14)

用于执行乘法的函数对象。有效呼叫operator*关于类型的两个实例T...

专门性

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

multiplies<void>

function object implementing x * y deducing argument and return types (class template specialization)

(since C++14)

multiplies<void>

function object implementing x * y deducing argument and return types (class template specialization)

成员类型

Type

Definition

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 product of two arguments (public member function)

乘数::操作员%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 multiply

返回值

结果lhs * rhs...

例外

%280%29

可能的实施

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

*。

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com