tuple(...).each error; why does foreach work and std.algorithms.each doesn't ?

Paul Backus snarwin at gmail.com
Tue Feb 11 19:04:17 UTC 2020


On Tuesday, 11 February 2020 at 18:55:45 UTC, wjoe wrote:
> What's a compiler list... is that something like a tuple? or 
> more like a macro expansion?
> Or is it only valid to use in a foreach to take advantage of 
> each item individually and for expansion in a function call ?
> Is it possible to partially expand like:
>
> void fn(int, uint) {}
> and ARGS(string, int, uint)
> and call fn(args[1..$]);
>
> Is that possible?

This article answers all of your questions:

https://dlang.org/articles/ctarguments.html


More information about the Digitalmars-d-learn mailing list