Solving the impossible?

Everlast Everlast at For.Ever
Tue Aug 28 19:09:38 UTC 2018


On Tuesday, 28 August 2018 at 12:00:50 UTC, bauss wrote:
> On Sunday, 26 August 2018 at 02:26:58 UTC, Everlast wrote:
>> in fact, I'd rather see
>>
>> void print(T)(T t, int... a)
>
> You were actually close.
>
> void print(T)(T t, int[] a ...);

Yeah, I see the link paul posted. The actual syntax seems a bit 
strange to me...

We don't do

A[] a ....

So it is not "logical".

foo(A...)(A a)

but if A is a specific type we must do

foo(int[] a ...)

The actual syntax then looks like we have an variadic set of 
parameters of type int[] rather than int.




More information about the Digitalmars-d-learn mailing list