<div dir="ltr">
<div><span class="gmail-_5yl5"><span>Hello, consider following code:<br></span></span></div><div><span class="gmail-_5yl5"><span><a target="_blank" href="https://godbolt.org/g/n3Rt9D" rel="nofollow">https://godbolt.org/g/UN8xTy</a><br></span></span></div><div><br></div><div>I do not understand, why overflow warning is here, there is no explicite int in this code.</div><div>When removing constexpr, warning disappears, when changing to:</div><div><br></div><div>
<span class="gmail-_5yl5"><span>static constexpr uint8_t b = uint8_t{~a};</span></span> </div><div><br></div><div>warning disappears.</div><div><br></div><div>Could someone explain it to me?<br></div><div><br></div><div><br><span class="gmail-_5yl5"><span></span></span> </div></div>