T... args!
Adam Ruppe
destructionator at gmail.com
Wed Dec 8 23:47:07 UTC 2021
On Wednesday, 8 December 2021 at 23:43:48 UTC, Salih Dincer wrote:
> Is this not a contradiction? : and 3.1415 aren't string:
>
> ```d
> void foo(string...)(string args) {
`string...` there is a user-defined identifier representing a mix
of types.
string isn't special, yo can declare your own variables with that
name. And that's what you did here.
I think you meant to say
void foo(string[] args...) {}
which is avariadtic number of only strings
More information about the Digitalmars-d-learn
mailing list