On 1/13/23 00:48, bauss wrote:

> 1. Change your mixin template to something like this:

There was a technique as a workaround for this template mixin limitation but I can't find it right now.

> 2. Change the place where you instantiate to this:

I think the workaround I am trying to remember would not require any change for the users.

Ok, it was something like this:

mixin template myStatement() {
    auto doIt() {
        import std.stdio : writeln;
        writeln("hi");
        return 0;
    }

    auto ignoreThis = doIt();
}

void main() {
    mixin myStatement!();
    mixin myStatement!();
}

Ali

Reply via email to