Thread overview
[Issue 5525] New: Eponymous templates should allow for overloaded eponymous members
Feb 04, 2011
Simen Kjaeraas
Jan 21, 2012
Walter Bright
Jan 21, 2012
Andrej Mitrovic
Feb 22, 2012
Kenji Hara
Feb 22, 2012
Kenji Hara
Feb 22, 2012
Walter Bright
February 04, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5525

           Summary: Eponymous templates should allow for overloaded
                    eponymous members
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: simen.kjaras@gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kjaras@gmail.com> 2011-02-04 14:22:21 PST ---
Given:

template foo( T ) {
    T foo( T t ) {
        return t;
    }
    T foo( T t, T u ) {
        return t + u;
    }
}

This should not cause problems. Basically, if a template contains an eponymous overload set, the overload set should be considered its only member.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 21, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5525


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com
           Severity|normal                      |enhancement


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 21, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5525


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich@gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-01-20 17:39:26 PST ---
I think a recent fix enables templates with multiple members to still be used as eponymous templates, but I don't recall the Issue number..

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 22, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5525



--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2012-02-22 04:28:11 PST ---
In dmd2.058, eponymous template hides internal names (fixing bug 4675). But eponymous overload set isn't still allowed.

Workaround:

template foo( T ) {
    T foox( T t ) {
        return t;
    }
    T foox( T t, T u ) {
        return t + u;
    }
    alias foox foo;  // bundle overloads as eponymous member.
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 22, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5525


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #3 from Kenji Hara <k.hara.pg@gmail.com> 2012-02-22 06:07:15 PST ---
https://github.com/D-Programming-Language/dmd/pull/758

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 22, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5525



--- Comment #4 from github-bugzilla@puremagic.com 2012-02-22 11:43:41 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/207e93a5f061e82f18ed7b0f21ea844ef1fec9cf
fix Issue 5525 - Eponymous templates should allow for overloaded eponymous
members

https://github.com/D-Programming-Language/dmd/commit/3fa6179603c0b6a57b0baccd40bc2f6155255d0a Merge pull request #758 from 9rnsr/fix5525

Issue 5525 - Eponymous templates should allow for overloaded eponymous members

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 22, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5525


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 04, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5525



--- Comment #5 from github-bugzilla@puremagic.com 2012-03-03 19:28:13 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/dd9bbbf78a8371dc21bbd1a0bd63b13dc88a8107 Remove workaround for issue 5525

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 09, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5525



--- Comment #6 from github-bugzilla@puremagic.com 2012-03-08 22:54:57 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/a0dbea1d2c998c7c9da90bf9481c70999361221a Remove workaround for issue 5525

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