小编Tho*_*mas的帖子

lambda表达式的变量模板

使用g ++执行此操作的正确方法是什么:

template < typename F >
void g (F f);

template < typename ... A >
void h (A ... a);

template < typename ... A >
void f (A ... a) {
  g ([&a] () { h (a...); }); // g++-4.6: error: parameter packs not expanded with »...«
}
Run Code Online (Sandbox Code Playgroud)

c++ templates g++ c++11

10
推荐指数
1
解决办法
4155
查看次数

标签 统计

c++ ×1

c++11 ×1

g++ ×1

templates ×1