MSTL 1.4.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
binder< Func(BoundArgs...)> 模板类 参考

通用函数绑定器的部分特化 更多...

#include <bind.hpp>

Public 成员函数

template<typename... Args>
MSTL_CONSTEXPR20 binder (Func &&func, Args &&... args)
 构造函数
 binder (const binder &)=default
 复制构造函数
 binder (binder &&)=default
 移动构造函数
template<typename... Args>
MSTL_CONSTEXPR20 auto operator() (Args &&... args) -> result_type< tuple< Args &&... > >
 调用操作符
template<typename... Args>
MSTL_CONSTEXPR20 auto operator() (Args &&... args) const -> result_type_const< tuple< Args &&... > >
 const调用操作符

详细描述

template<typename Func, typename... BoundArgs>
class binder< Func(BoundArgs...)>

通用函数绑定器的部分特化

模板参数
Func可调用对象类型
BoundArgs绑定的参数类型

存储函数对象和绑定的参数,当被调用时,将绑定的参数和调用时的参数 组合后调用原始函数。支持占位符参数重排。

在文件 bind.hpp433 行定义.

构造及析构函数说明

◆ binder()

template<typename Func, typename... BoundArgs>
template<typename... Args>
MSTL_CONSTEXPR20 binder< Func(BoundArgs...)>::binder ( Func && func,
Args &&... args )
inlineexplicit

构造函数

模板参数
Args绑定参数类型
参数
func要绑定的函数对象
args绑定的参数

在文件 bind.hpp541 行定义.

引用了 _MSTL , 以及 forward().

被这些函数引用 binder() , 以及 binder().

成员函数说明

◆ operator()() [1/2]

template<typename Func, typename... BoundArgs>
template<typename... Args>
MSTL_CONSTEXPR20 auto binder< Func(BoundArgs...)>::operator() ( Args &&... args) -> result_type< tuple< Args &&... > >
inline

调用操作符

模板参数
Args调用参数类型
参数
args调用参数
返回
函数调用结果

在文件 bind.hpp554 行定义.

引用了 _MSTL, forward() , 以及 forward_as_tuple().

◆ operator()() [2/2]

template<typename Func, typename... BoundArgs>
template<typename... Args>
MSTL_CONSTEXPR20 auto binder< Func(BoundArgs...)>::operator() ( Args &&... args) const -> result_type_const< tuple< Args &&... > >
inline

const调用操作符

模板参数
Args调用参数类型
参数
args调用参数
返回
函数调用结果

在文件 bind.hpp569 行定义.

引用了 _MSTL, forward() , 以及 forward_as_tuple().


该类的文档由以下文件生成: