On Wednesday, 26 June 2013 at 02:50:51 UTC, Eric wrote:

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.

-Eric

According to http://dlang.org/operatoroverloading.html#Cast, the following are rewritten:

if (e) => if (e.opCast!(bool))
if (!e) => if (!e.opCast!(bool))

So perhaps you need to override opCast!(bool).

Reply via email to