integral types
summary
Shows concrete failures: a template in Boost property_tree bug truncates wide characters to 8 bits and misparses hex character references; Boost.Accumulators overflow silently corrupts sum and mean when integers overflow because the author assumed it "can't happen"; std::lcm documents a precondition that leads to undefined behavior when a product exceeds the type; demonstrates branch-free overflow detection algorithms that compile to ~3–4 x86 instructions versus 7–10, and argues for checked arithmetic primitives in the standard library and portable multiword ops.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 0:25Program problem areas
- 0:58Integer arithmetic
- 1:21Writing software
- 2:59characters
- 8:08white charts
- 8:52integers
- 9:30integral promotion
- 10:19boost accumulators
- 11:24reference
- 13:04standard library
- 14:15accumulate
- 15:26other functions
- 16:20branchfree
- 17:11implementation cost
- 18:18multiplication
- 20:05division overflow
- 20:16double word division
- 20:58Haskell
- 27:21SafeC








