www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2972] New: Can't overload non-templated function against template

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2972

           Summary: Can't overload non-templated function against template
           Product: D
           Version: 2.030
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: dsimcha yahoo.com


DMD doesn't seem to allow overloading of non-templated functions against
templated functions even when they have different arity and therefore no
ambiguity exits.  Test case:

void foo(const char[] stuff) { }

void foo(T)(const char[] stuff, const T[] moreStuff){}

C:\home\dsimcha\bin\test.d(3): Error: template test.foo(T) conflicts with
function test.foo at C:\home\dsimcha\bin\test.d(1)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 13 2009
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2972





--- Comment #1 from David Simcha <dsimcha yahoo.com>  2009-05-13 09:29:48 PDT
---
Note:  See bug 2268.  This was fixed sometime in the last few releases, and I
think the fix for it caused this bug.

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