On Tuesday, 27 October 2015 at 07:56:51 UTC, SimonN wrote:
Hi,

I'd like to generate several very similar class methods with a mixin template. The mixin template shall take alias parameters, so that different methods can
bind it to different fields. Reduced problem case:

Template mixins can be used only for declaration.
Probably what you need is a (non-template) mixin.

Check this: http://dlang.org/mixin.html

You should generate code you need and then mixin it.


Reply via email to