A good example of C++ bizarre design decisions. The exact handing of float<->int conversions should use implementation-defined behavior instead, defining some cases to be UB just adds more traps with little to no performance benefits.
The same is true for bit-shifts greater than type bit size and negative bit-shifts.
Discussion (1 Comments)Read Original on HackerNews
The same is true for bit-shifts greater than type bit size and negative bit-shifts.