The official C++ Weekly Repository. Code samples and notes of future / past episodes will land here at various times. PR's will be accepted in some cases.
Ok, auto conversion between integer types is evil. Got it. We need to get our tools to help us find silent conversions. Got that. So when you absolutely have to do a narrowing or signed conversion (size_t to int, or int64_t to int32_t, what are some best practices?
gsl::narrow
boost::numeric_cast
static_cast
have faith that we will dodge overflow, underflow, and sign extension bugs
something else
Our code base has accumulated examples of all of these. Yuk.
Channel
"C++Weekly" episode request
Topics
Ok, auto conversion between integer types is evil. Got it. We need to get our tools to help us find silent conversions. Got that. So when you absolutely have to do a narrowing or signed conversion (size_t to int, or int64_t to int32_t, what are some best practices? gsl::narrow boost::numeric_cast static_cast have faith that we will dodge overflow, underflow, and sign extension bugs something else
Our code base has accumulated examples of all of these. Yuk.
Length
bite-sized (5-10 minutes)?