[Issue 6036] Constructor, static opCall and object opCall
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Sep 26 10:38:45 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6036
wfunction at hotmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wfunction at hotmail.com
--- Comment #5 from wfunction at hotmail.com 2011-09-26 10:38:11 PDT ---
An instance-level opCall should not disable the regular constructor.
Test case:
struct Adder {
int v;
auto opCall(int x) { return x + v; }
}
auto adder(int v) {
return Adder(v); // How do I call the constructor??
}
int main() {
auto a = adder(5);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list