Solving the impossible?

Everlast Everlast at For.Ever
Sun Aug 26 02:26:58 UTC 2018


void print()
{
}

void print(T, A...)(T t, A a)
{
     import std.stdio;
     writeln(t);
     print(a);
}

The problem is, suppose one wants to specify A

void print(T, int... A)(T t, A a)

while tricks can be used, why doesn't D support such an obvious 
syntax? We can specify an arbitrary type but can't restrict it in 
an obvious way, in fact, I'd rather see

void print(T)(T t, int... a)



More information about the Digitalmars-d-learn mailing list