Iterate over symbols in tupleof without instance

Artur Skawina art.08.09 at gmail.com
Tue Apr 15 05:11:40 PDT 2014


On 04/15/14 13:33, Dicebot wrote:
> On Tuesday, 15 April 2014 at 11:25:14 UTC, Artur Skawina wrote:
>>    void iterate(T)()
>>    {
>>        foreach (index, member; typeof(T.tupleof))
>>        {
>>            pragma(msg, __traits(identifier, T.tupleof[index]));
>>        }
>>    }
> 
> So ashamed :D

I would have not thought of that either, if Jacob didn't mention it... :)

http://forum.dlang.org/post/jl9gil$i9l$1@digitalmars.com

artur


More information about the Digitalmars-d-learn mailing list