module block_template;

void main()
{
    template BluePrint(T, U)
    {
        T integer;
        U floatingPoint;
    }

    BluePrint!(int, float);
}

// DMD returns
// template.d(13): Error: BluePrint!(int, float) has no effect

// I was expecting something like the following to be created after compilation:

module block_template;

void main()
{
    {
        int integer;
        float floatingPoint;
    }
}


I realize this is a corner case, but shouldn't the BluePrint!(int, float); statement blindly create a block of code?

Reply via email to