Bug 5525 – Eponymous templates should allow for overloaded eponymous members

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-02-04T14:22:00Z
Last change time
2012-03-08T22:54:57Z
Keywords
pull
Assigned to
nobody
Creator
simen.kjaras

Comments

Comment #0 by simen.kjaras — 2011-02-04T14:22:21Z
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.
Comment #1 by andrej.mitrovich — 2012-01-20T17:39:26Z
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..
Comment #2 by k.hara.pg — 2012-02-22T04:28:11Z
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. }
Comment #3 by k.hara.pg — 2012-02-22T06:07:15Z
Comment #4 by github-bugzilla — 2012-02-22T11:43:41Z
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
Comment #5 by github-bugzilla — 2012-03-03T19:28:13Z
Comment #6 by github-bugzilla — 2012-03-08T22:54:57Z