You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the video CppCon 2016: Chandler Carruth “Garbage In, Garbage Out: Arguing about Undefined Behavior...", the presenter at one point brings up the notion of having multiple integer types with the same width and signedness, but different contracts/behavior for things like wrap around and shifting past the end. I am wondering whether this is better handled as distinct types, or as different versions of the primitive operations themselves. For example, two different addition operations, one which does wrap-around and one which doesn't. Then the type wouldn't matter, only the operation.
The text was updated successfully, but these errors were encountered:
In the video CppCon 2016: Chandler Carruth “Garbage In, Garbage Out: Arguing about Undefined Behavior...", the presenter at one point brings up the notion of having multiple integer types with the same width and signedness, but different contracts/behavior for things like wrap around and shifting past the end. I am wondering whether this is better handled as distinct types, or as different versions of the primitive operations themselves. For example, two different addition operations, one which does wrap-around and one which doesn't. Then the type wouldn't matter, only the operation.
The text was updated successfully, but these errors were encountered: