filmov
tv
Timur Doumler — Type punning in modern C++
Показать описание
— —
. . . Type punning is often used in C++ for fast floating-point math, deserialising C++ objects from a sequence of bytes, and other purposes. Popular techniques involve unions, reinterpret_cast, and memcpy. C++20 provides new useful tools, such as bit_cast. And there are proposals to provide even better control over C++ object creation in the future.
This talk is a comprehensive overview of all of these techniques. We will discuss when and how they can be used safely without causing undefined behaviour, what C++ does and does not allow you to do (and why), existing holes in the C++ language, and how to fix them. In the process, we will cover important C++ concepts such as object lifetime, value representations, and aliasing rules.
. . . Type punning is often used in C++ for fast floating-point math, deserialising C++ objects from a sequence of bytes, and other purposes. Popular techniques involve unions, reinterpret_cast, and memcpy. C++20 provides new useful tools, such as bit_cast. And there are proposals to provide even better control over C++ object creation in the future.
This talk is a comprehensive overview of all of these techniques. We will discuss when and how they can be used safely without causing undefined behaviour, what C++ does and does not allow you to do (and why), existing holes in the C++ language, and how to fix them. In the process, we will cover important C++ concepts such as object lifetime, value representations, and aliasing rules.
Type punning in modern C++ - Timur Doumler - CppCon 2019
Timur Doumler — Type punning in modern C++
How C++23 Changes the Way We Write Code - Timur Doumler - CppCon 2022
ISO/IEC 14882 - Timur Doumler - CppCon 2019
Lightning Talk: Direct Aggregate Initialisation - Timur Doumler - CppCon 2021
CppCon 2017: Scott Schurr “Type Punning in C++17: Avoiding Pun-defined Behavior”
CppCon 2016: Timur Doumler “Want fast C++? Know your hardware!'
C++ Lambda Idioms - Timur Doumler - CppCon 2022
C++ : What is type punning and what is the purpose of it?
C++ : Reliable type-punning across C and C++ standards
Type punning done right - Andreas Weis - Lightning Talks Meeting C++ 2017
CppCon 2016: Timur Doumler “Readable C++'
C++Now 2019: Timur Doumler “ISO/IEC 14882”
Lightning Talk: Initialisation in Modern C++ - Timur Doumler - CppNow 2022
Taking a Byte Out of C++ - Avoiding Punning by Starting Lifetimes - Robert Leahy - CppCon 2022
C++ and Safety - Timur Doumler - C++ on Sea 2023
C++ : Unions, aliasing and type-punning in practice: what works and what does not?
Core C++ 2019 :: Timur Doumler :: Initialisation in modern C++
C++ and Safety - Timur Doumler - CppNorth 2023
Real-time Programming with the C++ Standard Library - Timur Doumler - CppCon 2021
Timur Doumler — Initialisation in modern C++
CppCon 2019: Timur Doumler “C++20: The small things”
C++ Lambda Idioms - Timur Doumler - CppNorth 2022
Timur Doumler: C++ and Safety
Комментарии