> On Jun 23, 2016, at 22:47, Félix Cloutier via swift-evolution 
> <[email protected]> wrote:
> 
> Thanks for answering my questions earlier. I like a lot of the changes.
> 
> Speaking of heterogeneous comparisons again, though, how are comparisons of 
> negative signed integers with unsigned integers handled?
> 
> Félix

I can't speak for anyone else, but I'd check the sign bit, return the correct 
answer if it's negative, and if not do an unsafeBitCast to the same-width 
unsigned type and use that to return the results of the homogeneous comparison.

There's probably a quicker way using some arcane bit-fiddling wizardry, but I 
don't know it off the top of my head.

- Dave Sweeris
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to