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

Steve Schveighoffer schveiguy at yahoo.com
Tue Mar 9 07:25:35 PST 2010


The only thing it disallows is making !x return something other than a bool.  The only place I can think of that would be useful is some sort of logic type that has more than 2 states, but that's a stretch.

The current implementation looks good to me, I was just curious about it.

-Steve



----- Original Message ----
> From: Andrei Alexandrescu <andrei at erdani.com>
> 
> Walter and I agreed that cast to bool is as good as opUnary. Overloading 
> unary "!" is now not possible.
> 
> Andrei


      


More information about the phobos mailing list