Converting a variadic macro to a variadic template function? <p>Given a variadic macro of the form:</p> <pre><code>#define MY_CALL_RETURN_F(FType, FId, ...) \ if(/*prelude omitted*/) { \ FType f = (FType)GetFuncFomId(FId); \ if(f) { \ return f(__VA_ARGS__); \ } else { \ throw invalid_function_id(FId); \ } \ } \ /**/ </code></pre> <p>-- how can this be rewritten to a variadic function template?</p> <pre><code>template&lt;typename FType, typename ...Args&gt; /*return type?*/ tmpl_call_return_f(MyFunId const&amp; FId, /*what goes here?*/) { ... FType f = (FType)GetFuncFomId(FId); return f(/*what goes here?*/); ... } </code></pre> <p>Update: I'm specifically interested in how to declare the reference type for the <code>Args</code>: <code>&amp;&amp;</code> or <code>const&amp;</code> or what?</p> <p>Update: Note that FType is supposed to be a "plain" function pointer.</p>