Get name of enum val at compile-time?
Timon Gehr
timon.gehr at gmx.ch
Sun Jan 15 13:19:44 PST 2012
On 01/15/2012 10:02 PM, Nick Sabalausky wrote:
> "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 :)
>
>
I suspect a better error message would have prevented this.
DMD still has some potential of improvement in that area. =)
More information about the Digitalmars-d-learn
mailing list