passing a variadic parameter to randomSample

forkit forkit at gmail.com
Tue Jan 25 22:48:26 UTC 2022


On Tuesday, 25 January 2022 at 22:35:29 UTC, forkit wrote:
>

I should point out (to anyone looking at that code I posted), 
that it's easier, and makes more sense, to just write:

writeln( ["typeA", "typeB", "typeC"].choice );

... but my main focus here, was learning about variadic template 
functions.



More information about the Digitalmars-d-learn mailing list