<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div>On Jun 23, 2016, at 22:47, Félix Cloutier via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8">Thanks for answering my questions earlier. I like a lot of the changes.<div class=""><br class=""></div><div class="">Speaking of heterogeneous comparisons again, though, how are comparisons of negative signed integers with unsigned integers handled?<br class=""><div class="">
<br class="Apple-interchange-newline"><span style="color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;" class="">Félix</span></div></div></div></blockquote><br><div>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.</div><div><br></div><div>There's probably a quicker way using some arcane bit-fiddling wizardry, but I don't know it off the top of my head.</div><div><br></div><div>- Dave Sweeris</div></body></html>