Bug 3810 – overloading on const does not work for template methods
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2010-02-17T21:15:00Z
Last change time
2015-06-09T01:27:39Z
Assigned to
nobody
Creator
andrei
Comments
Comment #0 by andrei — 2010-02-17T21:15:00Z
struct A
{
void fun() {}
void fun() const {}
T gun(T)() {}
T gun(T)() const {}
}
void main() {
A a;
const A b;
a.fun();
b.fun();
a.gun!int();
b.gun!int();
}
The code should work. It does for fun() but not fur gun().
Comment #1 by schveiguy — 2010-02-18T04:51:34Z
Taking the liberty of fixing your description since it doesn't match the example ;)
Comment #2 by k.hara.pg — 2011-07-20T23:01:05Z
Probably this issue is same as issue 5896.
Comment #3 by andrej.mitrovich — 2012-12-21T09:13:03Z