[Issue 7366] New: template overload resolution failure

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 24 19:50:01 PST 2012


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

           Summary: template overload resolution failure
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at gmx.ch 2012-01-24 19:49:57 PST ---
With DMD 2.058head:

auto foo(T1)(T1 x){}
auto foo(T1,T2)(T1 x,T2 y){}
void main(){foo!(ubyte)(0);}

Error: template tt.foo(T1) does not match any function template declaration
Error: template tt.foo(T1) cannot deduce template function from argument types
!(ubyte)(int)
Error: template instance foo!(ubyte) errors instantiating template

The following works (showing that the first error message is nonsensical):

auto foo(T1)(T1 x){}
void main(){foo!(ubyte)(0);}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list