Console Library 8.0.0
A header-only library that makes C++ simple
Loading...
Searching...
No Matches
console::ops::Compose< F, G > Struct Template Reference

函数组合器,将两个函数组合为一个函数。 More...

#include <gen.h>

Public Member Functions

template<class T>
auto operator() (T x) const -> decltype(g(f(x)))
 对输入值应用两个函数的组合。

Public Attributes

F f
G g

Detailed Description

template<class F, class G>
struct console::ops::Compose< F, G >

函数组合器,将两个函数组合为一个函数。

Template Parameters
F第一个函数类型。
G第二个函数类型。

Member Function Documentation

◆ operator()()

template<class F, class G>
template<class T>
auto console::ops::Compose< F, G >::operator() ( T x) const -> decltype(g(f(x)))
inline

对输入值应用两个函数的组合。

Template Parameters
T输入值类型。
Parameters
x输入值。
Returns
g(f(x))。

Member Data Documentation

◆ f

template<class F, class G>
F console::ops::Compose< F, G >::f

◆ g

template<class F, class G>
G console::ops::Compose< F, G >::g

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