kinda, but with minimal overhead and boilerplate


On Wed, Dec 5, 2012 at 8:32 PM, Mike Wey <mike-wey@example.com> wrote:
On 12/05/2012 04:40 PM, Gor Gyolchanyan wrote:
A function with variadic template parameters is just a function which
takes a set of compile-time known parameters.
My goal is to have a non-template function taking variadic parameters.

long bar(...)
{
     return foo(...);
}

This is necessary to be able to pass variables to functions without
knowing the type of the functions.


--
Bye,
Gor Gyolchanyan.

Something like this?

long bar(...)
{
    if( _arguments[0] == typeid(int) && _arguments[1] == typeid(char) )
    {
        return foo(va_arg!(int)(_argptr), va_arg!(char)(_argptr));
    }
    else
        throw;
}

--
Mike Wey



--
Bye,
Gor Gyolchanyan.