std::tr1::函数如何获取签名特性的参数并专门化类*
How std:: tr1:: function gets the parameters of the signature features and specializes the class*
我想知道std::function
是如何从您传入的函数类型中确定参数和参数的。
这是一个部分模板专用化。
template<typename T> class function;
template<typename Ret> class function<Ret()> { ... };
template<typename Ret, typename Arg1> class function<Ret(Arg1)> { ... };
正如您所看到的,这将很快变老,但可变模板将在C++0x中处理它。
相关文章:
- 是否可以对零模板参数进行模板专门化
- 我能否根据其运算符()的签名专门化可变参数模板参数
- 取消专门化C++模板参数
- 模板函数,其中一个参数需要专门化,而另一个不需要
- 如何为特定数量的模板参数专门化可变参数模板结构
- 使用非类型模板参数进行专门化模板模板参数
- g++和clang++在结构/类专门化中具有非类型参数的不同行为
- 我如何避免使用依赖于参数的查找明确专门化模板化功能
- 专门化采用通用引用参数的函数模板
- 如果需要参数包,则使用SFINAE专门化类
- c++多参数模板化的类成员专门化
- C++11`using`关键字:专门化模板参数的模板别名
- 如何在没有参数的情况下专门化模板类
- 我可以用非模板类专门化一个可变模板模板模板参数吗
- 如何在C++中专门化 std::vector 的模板模板参数
- 使用已推导的模板参数专门化模板成员函数
- 如何根据类的模板参数专门化模板成员函数?
- 基于嵌套的内部参数专门化模板
- 如何用模板模板参数专门化模板类的成员
- 使用模板类作为参数专门化模板结构