Bug 1569 – I cannot override opCall as a template function. It is very strange for a C++ programmer.

Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2007-10-10T09:02:00Z
Last change time
2015-06-09T05:15:15Z
Assigned to
dvdfrdmn
Creator
pop.atry

Comments

Comment #0 by pop.atry — 2007-10-10T09:02:48Z
struct S { void opCall(int n)() { } } unittest { S s; s!(1)(); // error }
Comment #1 by dvdfrdmn — 2007-10-13T15:17:32Z
The struct instance 's' is not a template name so you should not expect this to work. If you want to request that something like this be allowed, please re-open the issue and assign it to Walter Bright. It would probably be a good idea to discuss it on the newsgroup first.