disabling unary "-" for unsigned types

Rainer Deyke rainerd at eldwood.com
Mon Feb 15 18:32:21 PST 2010


Ellery Newcomer wrote:
> On 02/15/2010 05:33 PM, Steven Schveighoffer wrote:
>> uint a = -1; // error
> 
> I can't say I would appreciate having to write
> 
> uint a = 0xFFFFFFFF;
> 
> or the equivalent for ulong.

uint a = ~0u;


-- 
Rainer Deyke - rainerd at eldwood.com



More information about the Digitalmars-d mailing list