<div dir="ltr">Hi all,<div><br></div><div>I hope this is the correct mailing list.</div><div><br></div><div>I wanted to ask why clang chooses to compare scoped enumerators as if they were unsigned numbers, even when the underlying type is signed. For example</div>
<div><br></div><div>enum class E : int</div><div>{</div><div> neg_one = -1,</div><div> one = 1;</div><div>};</div><div><br></div><div>neg_one > one; // true</div><div><br></div><div>What is the motivation for this behavior?</div>
<div><br></div><div>Best,</div><div><br></div><div>Eric</div></div>