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

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

#include <bind.hpp>

Public 成员函数

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

详细描述

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

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

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

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

在文件 bind.hpp422 行定义.

构造及析构函数说明

◆ binder()

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

构造函数

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

在文件 bind.hpp522 行定义.

引用了 forward().

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

成员函数说明

◆ operator()() [1/2]

template<typename Func, typename... BoundArgs>
template<typename... Args>
decltype(auto) binder< Func(BoundArgs...)>::operator() ( Args &&... args)
inlineconstexpr

调用操作符

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

在文件 bind.hpp536 行定义.

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

◆ operator()() [2/2]

template<typename Func, typename... BoundArgs>
template<typename... Args>
decltype(auto) binder< Func(BoundArgs...)>::operator() ( Args &&... args) const
inlineconstexpr

const调用操作符

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

在文件 bind.hpp548 行定义.

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


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