Template mixins

Jarrett Billingsley jarrett.billingsley at gmail.com
Fri Sep 5 06:20:52 PDT 2008


On Fri, Sep 5, 2008 at 6:29 AM, Simen Haugen <simen at norstat.no> wrote:
> This is probably a stupid question, but I cannot get a simple mixin to work:
>
> template Test(R, N=char[])
> {
>    mixin(R.stringof~" "~N~"() { return "~R.stringof~".init; }");
> }

You mean "template Test(R, char[] N)".


More information about the Digitalmars-d-learn mailing list