What's the best (least overhead and most portable and safe) way wrapping a function into a variadic-parameter function?<div><br></div><div>For instance:<br></div><div><div><br></div><div>long foo(int i, char c)</div><div>
{</div><div>   /// ...<br>}</div><div><br></div><div>long bar(...)<br>{</div><div>    return foo(/* ??? */);<br>}<br><div><div><br></div><div>This is necessary for losing the parameter types, but still having the function callable with its expected parameters. I suspect this could be done using inline assembler and knowledge of the D ABI to achieve near-zero overhead.</div>
<div><br></div><div>The wrapper can include dynamic type checking using the automatically passed _arguments array to ensure type safety.</div><div><br></div><div>This is useful for dynamic dispatching.</div><div><br></div>
-- <br>Bye,<br>Gor Gyolchanyan.<br>
</div></div></div>