[Issue 4916] struct VariantN does not overload ()
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jan 9 08:45:15 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4916
--- Comment #1 from Rob Jacques <sandford at jhu.edu> 2011-01-09 08:43:29 PST ---
Note that as listed in Bug 4053, struct constructors and opCall are not
compatible, so the v() syntax isn't possible. In the update to variant I've
been working on, I've added a .call method, which supports functions,
delegates, opCall, etc. Also, multi-argument opCall should be supported:
unittest {
Variant v;
int foo(int x, int y) { return x+y; }
v = &foo;
assert(v(4,6) == 10);
}
See https://jshare.johnshopkins.edu/rjacque2/public_html/variant.mht
--
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