itfi limitation or bug on my part?

Brad Roberts braddr at puremagic.com
Sat Aug 7 11:54:29 PDT 2010


module test;

void main()
{
    int[] foos;
    func1(foos);
}

void func1(T)(const T[] foos)
{
    T afoo;
    func2(foos, afoo);
}

void func2(T)(const T[] foos, out T afoo)
{
}

$ dmd -c test.d
test.d(12): Error: template test.func2(T) does not match any function template
declaration
test.d(12): Error: template test.func2(T) cannot deduce template function from
argument types !()(const(int[]),int)
test.d(6): Error: template instance test.func1!(int) error instantiating

Ignore style.. this is a massively reduced case from a much more complex block
of code.



More information about the Digitalmars-d-learn mailing list