--- Comment #6 from Kenji Hara <> 2012-05-17 23:04:02 PDT ---
(In reply to comment #5)
> Thanks.
> Just wondering, why is the second one an 'enhancement'? Isn't opUnary just a
> member, which should also be opDispatch'ed?

Today these forwarding doesn't work at all.

struct S { void opDispatch(string op, A...)(A args){} }
void main() {
    S s;
    +s;     // not converted to opDispatch!("opUnary", ...)
    s + s;  // not converted to opDispatch!("opBinary", ...)
    s();    // not converted to opDispatch!("opCall", ...)

So I think this is an enhancement rather than a bug.

> (I'm figuring that the only members which should not be opDispatch'able are:
> opDispatch itself, the constructors, and the destructor. Anything else, by
> definition, is dispatched on the object.)

I think no. At least, constructor and destructor have some special features
(e.g. can modify const members for construction), but opDispatch doesn't.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to