Automatic registration of D enum. (not global)
1 enum Direction { up = 0, down = 1 } 2 3 auto ctx = new DukContext(); 4 ctx.register!Direction.setGlobal("Direction"); // equivalent to ctx.registerGlobal!Direction 5 assert(ctx.evalString!int(r"a = Direction.down") == 1);
See Implementation
Automatic registration of D enum. (not global)