Static foreach internal variable

Andrey saasecondbox at yandex.ru
Thu Aug 30 08:19:47 UTC 2018


Hello,
is it possible to declare an internal variable in "static 
foreach" and on each iteration assign something to it?
Example:
>static foreach(arg; SomeAliasSeq)
>{
>    internal = arg[0].converted;    // a shortcut for expression 
> "arg[0].converted"
>
>    static if(internal.length == 0) { ... }
>    else static if(internal.isNull) { ... }
>    else { ... }
>}


More information about the Digitalmars-d-learn mailing list