Console Library 8.0.0
A header-only library that makes C++ simple
Loading...
Searching...
No Matches
console::ops::multiplies_t Struct Reference

乘法函数子。 More...

#include <gextra.h>

Public Member Functions

template<class T, class U>
auto operator() (T a, U b) const -> decltype(a *b)
 对两个值执行乘法。

Detailed Description

乘法函数子。

等价于 operator*,支持任意类型(只要定义了 operator*)。 用于 reduce 等需要二元操作的场景。

Member Function Documentation

◆ operator()()

template<class T, class U>
auto console::ops::multiplies_t::operator() ( T a,
U b ) const -> decltype(a *b)
inline

对两个值执行乘法。

Template Parameters
T左操作数类型。
U右操作数类型。
Parameters
a左操作数。
b右操作数。
Returns
decltype(a * b) 两数之积。

The documentation for this struct was generated from the following file: