casting int[] to bool[]

BCS none at anon.com
Wed Jan 28 22:24:52 PST 2009


Hello Saaa,

> :D
> 
> Casting an expression to bool means testing for 0 or !=0 for
> arithmetic
> types, and null or !=null for pointers or references.
> So a per element bool cast should be safe, right?

cast is an O(1) op in all cases except opCast on UDTs. All array casts just 
paint an array of the old type over the new.




More information about the Digitalmars-d-learn mailing list