Mutator.
Accessor.
struct Bar { string _s; int _i; bool _b; string[string] _aa; mixin UnderscoreOpDispatcher; }
static struct Bar { string _s; int _i; bool _b = true; string[string] _aa; mixin UnderscoreOpDispatcher; } Bar bar; bar.s = "hi there"; bar.i = -123; bar.b = false; bar.aa = [ "hello" : "world" ]; bar.aa = [ "foo" : "bar" ]; assert(bar.aa == [ "hello" : "world", "foo" : "bar"]);
Mixin template generating an opDispatch redirecting calls to members whose names match the passed variable string but with an underscore prepended to the name.
This is a convenience mixin for OpDispatcher!("_", Yes.inFront).