Append variadic template parameters
Mark Fisher via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Feb 5 12:36:57 PST 2017
I want to write a template:
static auto ref BindArg(alias Func,alias arg,args...)() {
return Func(arg,args);
}
where Func is called with 'arg' followed by the 'args' parameters.
eg:
string f(string a,int b,int c);
BindArg(f,"1",2,3);
The compiler throws an error:
Error: function f (string a, int b, int c) is not callable using
argument types ()
How do I append the parameters?
More information about the Digitalmars-d-learn
mailing list