Non-static foreach on tupleof has no UDAs?

IchorDev zxinsworld at gmail.com
Tue Aug 5 14:19:16 UTC 2025


On Thursday, 31 July 2025 at 14:44:21 UTC, monkyyy wrote:
> On Thursday, 31 July 2025 at 11:29:41 UTC, IchorDev wrote:
>> I'd much prefer if the above code worked rather than having to 
>> do this:
>> ```d
>> static foreach(i; 0..a.tupleof.length){
>> 	pragma(msg, __traits(getAttributes, a.tupleof[i])); 
>> //AliasSeq!(y(10))
>> }
>> ```
>
> That verbosity is unnecessary to swap to the other foreach: 
> `static foreach(b; a.tupleof){` prints as well

Nope. I need to declare enums in the foreach body.



More information about the Digitalmars-d-learn mailing list