Type Punning in C++: How Type Conversions Can Break Your Code
Автор: CppQuest
Загружено: 2026-01-02
Просмотров: 24
Описание:
Type punning in C++ looks harmless — until the compiler breaks your assumptions.
In this video, we focus on strict aliasing and show how certain type conversions introduce undefined behavior, even when the code appears to work. Through a concrete example, you’ll see how violating aliasing rules allows the compiler to legally optimize away logic you expect to run.
Timestamps:
Intro - 00:00
Pointer Aliasing - 01:40
Strict Aliasing - 03:05
References
Link to example: https://www.godbolt.org/z/dravz16Kq
Blog posts:
https://silvermight.com/2025/10/23/type-pu...
CppCon:
• Type punning in modern C++ - Timur Doumler...
#cpp #cplusplus #undefinedbehavior #typepunning #compiler #optimization #lowlevel
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: