[英]Calling a variadic function template through a std::function
I have a variadic template function declared as follows: 我有一个可变参数模板函数,声明如下:
template <typename ...Arguments>
double pricer(Arguments... params);
With specializations for different argument types. 具有针对不同参数类型的专门化。
What's the correct syntax for calling the template specializations through a single std::function
"wrapper"? 通过单个
std::function
“ wrapper”调用模板专业化的正确语法是什么? Is it possible? 可能吗?
您不能将模板函数与std::function
绑定在一起,只能在其中存储模板函数的特定实例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.