[Issue 1641] New: Template function arg deduction gets confused when used with the inner name trick

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 5 13:50:57 PST 2007


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

           Summary: Template function arg deduction gets confused when used
                    with the inner name trick
           Product: D
           Version: 2.007
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: andrei at metalanguage.com


The use case is simple:


template foo(T)
{
    void foo(U)(U a, T b, T c)
    {
    }
}

void main()
{
    int x;
    foo!(uint)(x, 0, 1);
}

The template engine should properly bind 0 and 1 to type uint, but it fails to
do so. As a result, the entire program does not compile although it should.


-- 



More information about the Digitalmars-d-bugs mailing list