[phobos] Fw: cast(bool) vs. opUnary!"!"

Andrei Alexandrescu andrei at erdani.com
Tue Mar 9 08:52:56 PST 2010


Steve Schveighoffer wrote:
> The only thing it disallows is making !x return something other than
> a bool.

That's a bug. We must NOT have several redundant and potentially 
contradictory ways of defining interlinked features. The "!" operator is 
NOT overloadable, and !x must be rewritten to !x.opCast!bool().



Andrei


More information about the phobos mailing list