On Wednesday, 24 August 2016 at 23:04:25 UTC, Illuminati wrote:
How can I create nested enum like structures?instead of Enum.X_Y I would like to access like Enum.X.YYet I want it to behave exactly as an enum. I just want to not use _ as .'s are better as they express more clearly what I want.
struct MyEnum { enum X { Y = 10, Z = 20 } } void main() { import std.stdio; int y = MyEnum.X.Y; writeln(y); }