How Hard Could It Be? Lessons Learned from Replacing int64 With int64_t.
summary
Google spends a year-plus migrating a typedef across ~250M lines to the standard int64_t, first proving the aliases are identical, then fixing ~1,000 template deduction failures, hundreds of format-string sites, virtual-signature mismatches, and dozens of ODR/linker issues. Built a replacement string printf → str format with constexpr-like checking, wrote many clang-tidy fixes (including the static const-expr pattern), used PGO remapping to avoid a measured ~2% web search regression, and lands the migration successfully.
AI-written summary · about
chapters (9)
- 0:00Introduction to C++ integers
- 1:02The problem with type aliases
- 5:37Strategies for refactoring
- 13:54Handling reference mismatches
- 18:34Overload resolution issues
- 23:46Silent logic errors
- 28:36Format string challenges
- 32:30Linker and definition errors
- 37:55Performance and conclusions
related talks
57mHow Hard Could It Be? int64 → int64_t
51mTypical C++, but Why?
01h 01mTime Travel: Applying Gradual Typing to Time Types with Clang's LibTooling
01h 13mType safe C++ – LOL! :-)
54mTypical C++, But Why?
01h 37mRethinking the Way We Do Templates in C++ even more
03mLet's cmakeify the C++ standard library
01h 34mC++11/14 at Scale - What Have We Learned?
