expand variadic template parameters
"André" via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Mar 10 12:11:21 PDT 2015
Hi,
in this minified example I try to expand the variadic parmaters of
foo to bar:
import std.typecons;
void foo(T ...)(T args)
{
bar(args.expand);
}
void bar(int i, string s){}
void main()
{
foo(1, "a");
}
I got the syntax error: no property 'expand' for type '(int,
string)'
I understand args is a TypeTuple and therefore expand is not
working.
Is there a simple way to get it working?
Kind regards
André
More information about the Digitalmars-d-learn
mailing list