www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1528] New: shouldn't templates conflict with templates?

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

           Summary: shouldn't templates conflict with templates?
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: davidl 126.com


int[char] v;
char m;
int d;

template toString (U,C,T:U[C])
{
        char[] toString(U m,C c, T t) { return ""; }
}
char[] toString(int k){return "";}   

The confliction can actually be detected till the last moment of instantiation.
I don't see why we prevent it at the moment.


-- 
Sep 22 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1528


wbaxter gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|shouldn't templates conflict|templates should not
                   |with templates?             |conflict with non-templates




------- Comment #1 from wbaxter gmail.com  2007-09-22 22:17 -------
The ability to do this sort of overloading is scheduled to be added to D2.0,
according to the notes from the Walter/Andrei talk at the D conference.


-- 
Sep 22 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1528


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|spec                        |
                 CC|                            |clugdbug yahoo.com.au
           Severity|trivial                     |enhancement


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