On 9/14/20 2:25 AM, Simen Kjærås wrote:
On Monday, 14 September 2020 at 03:48:51 UTC, Steven Schveighoffer wrote:
Consider the enum:
enum Foo { a, b }
Foo.a.stringof => "a"
enum x = Foo.a;
x.stringof => "cast(Foo)0"
Is there another way I can take an enum value that's known at compile
time (
On Monday, 14 September 2020 at 03:48:51 UTC, Steven
Schveighoffer wrote:
Consider the enum:
enum Foo { a, b }
Foo.a.stringof => "a"
enum x = Foo.a;
x.stringof => "cast(Foo)0"
Is there another way I can take an enum value that's known at
compile time (but not the actual identifier), and get t
Consider the enum:
enum Foo { a, b }
Foo.a.stringof => "a"
enum x = Foo.a;
x.stringof => "cast(Foo)0"
Is there another way I can take an enum value that's known at compile
time (but not the actual identifier), and get the name of it? I know I
can use a switch, or to!string. But I was hoping t