core.reflect vs c++ reflection

bauss jj_1337 at live.dk
Mon Sep 27 06:25:07 UTC 2021


On Sunday, 26 September 2021 at 19:09:31 UTC, Stefan Koch wrote:
> On Sunday, 26 September 2021 at 19:03:24 UTC, Stefan Koch wrote:
>> Good day,
>
>>
>>
>> Please let know what you think.
>
> Ugh typo.
>
>>static immutable ed = cast(EnumDeclaration)nodeFromName(E);
>
> is supposed to be:
>
> `static immutable ed = cast(EnumDeclaration)nodeFromName("E");`

What about E.stringof? Instead of hardcoding names :) Not sure if 
stringof will return E in all cases, so obviously only if it 
works.


More information about the Digitalmars-d mailing list