passing a variadic parameter to randomSample

Stanislav Blinov stanislav.blinov at gmail.com
Wed Jan 26 10:20:02 UTC 2022


On Tuesday, 25 January 2022 at 22:07:43 UTC, Ali Çehreli wrote:
> On 1/25/22 13:55, forkit wrote:
>
> > auto RandomChoice(R...)(R r)
>
> Watch out though: The compiler will compile a different 
> function per set of values. For example, there will be separate 
> RandomChoice instances for ("hello") vs. ("world").

Huh? Perhaps you meant "for ("hello") vs. ("hello", "world")"? 
Because it would be the same instantiation for a single string 
argument :)




More information about the Digitalmars-d-learn mailing list