Variadic templates for lambda expressions

前端 未结 2 1084
渐次进展
渐次进展 2021-01-04 18:54

What\'s the correct way to do this with g++:

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

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

template <          


        
2条回答
  •  天涯浪人
    2021-01-04 19:25

    #include 
    template < typename ... A >
    void f (A ... a) {
      g (std::bind(h, a...));
    }
    

提交回复
热议问题