disabling unary "-" for unsigned types
Justin Johansson
no at spam.com
Sun Feb 14 13:14:01 PST 2010
Andrei Alexandrescu wrote:
> ulong x0;
> static assert(!__traits(compiles, -x0));
> uint x1;
> static assert(!__traits(compiles, -x1));
> ushort x2;
> static assert(!__traits(compiles, -x2));
> ubyte x3;
> static assert(!__traits(compiles, -x3));
>
> Sounds good?
>
> Andrei
Sounds excellent. Who would have thought of that?
Cheers
Justin Johansson
More information about the Digitalmars-d
mailing list