http://d.puremagic.com/issues/show_bug.cgi?id=2803

           Summary: template + default argument = doesn't work
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzi...@digitalmars.com
        ReportedBy: and...@metalanguage.com


struct S {}
ref S getS();

void fun(T, U)(T t, ref U u = getS)
{
}

void main()
{
    fun(1);
}

./test.d(10): Error: template test.fun(T,U) does not match any function
template declaration
./test.d(10): Error: template test.fun(T,U) cannot deduce template function
from argument types !()(int)


-- 

Reply via email to