Get name of enum val at compile-time?

Nick Sabalausky a at a.a
Sun Jan 15 13:02:46 PST 2012


"Timon Gehr" <timon.gehr at gmx.ch> wrote in message 
news:jevefv$2je6$1 at digitalmars.com...
> On 01/15/2012 09:34 PM, Nick Sabalausky wrote:
>> import std.conv;
>> enum Foo { hello }
>> enum x = to!string();
>>
>
> enum x = to!string(Foo.hello);

Goddamnnit, what the fuck is wrong with me? Yes that works :)




More information about the Digitalmars-d-learn mailing list