Solving the impossible?

Paul Backus snarwin at gmail.com
Sun Aug 26 02:55:56 UTC 2018


On Sunday, 26 August 2018 at 02:26:58 UTC, Everlast wrote:
> 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)

https://dlang.org/spec/function.html#typesafe_variadic_functions


More information about the Digitalmars-d-learn mailing list