Iterate over symbols in tupleof without instance

Benjamin Thaut code at benjamin-thaut.de
Tue Apr 15 05:38:23 PDT 2014


Am 15.04.2014 14:33, schrieb Dicebot:
>
> So, what is wrong with this?
>
> void main(string[] args)
> {
>    Bla bla;
>    foreach(index, a; typeof(Bla.tupleof))
>    {
>      pragma(msg, hasAttribute!(Bla.tupleof[index], Property).stringof);
>    }
> }
>
> http://dpaste.dzfl.pl/b38035362b29

Nothing, thanks for the solution. It didn't come to my mind, to use the 
index from iterating over the type tuple to index the symbol tuple.

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d-learn mailing list