jeudi 3 janvier 2019

Multiple variadic templates function [on hold]

Assume I have two functions f1() and f2() defined as follow:

template<class ... Types> void f1(Types ... args1)
template<class ... Types> void f2(Types ... args2)

Now I want to create a third function f3() which takes input f1() and f2(), how do I define f3() with both args1... and args2...?

template<class F1, class F2> void f3(F1 f1, F2 f2) {
  f1();  // how do I call f1? I need to pass in the args... 
}    

Aucun commentaire:

Enregistrer un commentaire