template Foo(T, T val) fails to work

Chris Miller chris at dprogramming.com
Mon Mar 20 02:29:58 PST 2006


template Foo(T, T val)
{
    const T foo = val;
}
int main()
{
    mixin .Foo!(int, 22); // Line 7
    return 0;
}


DMD 0.150 output:

test.d(7): mixin mixin .Foo!(int,22);
  does not match any template declaration

(also notice the break in the error message)

It works fine if changing
    template Foo(T, T val)
to
    template Foo(T, int val)
but that's not what I want.



More information about the Digitalmars-d-bugs mailing list