C++ Club cover image

Meeting 142

C++ Club

00:00

Unsigned vs Unsigned?

Unsigned arithmetic tends to contain more bugs. Don't try to avoid negative values by using unsigned. Choosing unsigned implies many changes to the usual behavior of intages, including modular arithmetic. Can suppress warnings related to overflow and opens the door for errors related to signed unsigned mixes. Robert rami says the dispute is never ever going to be resolved, but until it does, use boost safe numerics. See also a good presentation on this topic from sipipicon 20 16. John calb unsigned, a guide for better cold where he explains very well why using ansint for arithmetic is a bad idea. Lesle li posted an article about stood a line in which he describes a use case

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app