On Wednesday, 17 December 2014 at 01:39:07 UTC, anonymous wrote:
But if you want to avoid `p`, just do the substitution:
mixin template makeProperty(T, string name, alias func) {
mixin("enum %s = makeUnnamedProperty!(T,
func);".format(name)); // or alias
}
Thanks, that looks exactly like what I need -- I figured
something like this would compile, but I guess it's slightly
counterintuitive that you can access "T" and 'func" this way.
Wonder if this is doable within a single mixin template without
using makeUnnamedProperty?