Overload of ! operator

bearophile bearophileHUGS at lycos.com
Tue Jun 25 20:18:28 PDT 2013


Eric:

> Is there a way to overload the ! operator?  I can't seem to get
> it to work with the standard unaryOp method.  I need this 
> because
> I am making a wrapper for a C++ API that has ! overloaded.

D is not a superset of C++ and I think there is no way to 
overload the ! alone. This is by design. But you can define a 
"bang" property method.

Maybe other people can give you a better answer.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list