Lightning Talk: Safe Arithmetic Speed-Run: Experimental C++ Library
summary
Experimental Safe Arithmetic library on Intel's GitHub provides C++ types that encode integer constraints, using an integer constraint DSL and a mask primitive to fix or vary bits; compile-time rules forbid unsafe assignments, require initialization for nonzero types, and make division/modulo fail to compile unless the denominator is proven nonzero. It adds a runtime match for validated inputs, explicit unsafe_cast for reviewer-visible bypasses, and a single explicit safe_cast for extracting raw ints. The library compiles and enforces checks, not heavy formal proofs.
AI-written summary · about
related talks
01h 30mEnhancing Safety in C++ Code With Modern C++ Quantities and Units Library
29mintegral types
01h 13mType safe C++ – LOL! :-)
50mType safe C++? LOL!
52mNon-conforming C++: the Secrets the Committee Is Hiding From You
01h 03mHow to Improve the Safety of C++ Code With a Quantities & Units Library
51mThe C++ Type System is your Friend
57mAdventures in SIMD-Thinking (part 1 of 2)
