Back to Basics: Lifetime Management in Cpp - Phil Nash - CppCon 2024 @CppCon
Back to Basics: Lifetime Management in Cpp - Phil Nash - CppCon 2024  @CppCon
Uploaded March 2025 | Updated September 2026, 3 weeks ago
cppcon.org
---

Back to Basics: Lifetime Management in Cpp - Phil Nash - CppCon 2024
---

Lifetime management in C++ is flexible and powerful. But this comes with complexity and lots of ways to shoot your leg off. That has only gotten worse as the language has evolved.

This talk introduces or recaps the so-called Rule of 0 and Rule of 5, which suggest that you should aim to need no Special Member Functions (customs constructors, destructors assignment operators) for most of your types. But if you do need them, you probably need all 5.

But if we do need to implement them it can still be hard to know what to do. It helps to know what sort of type you are dealing with, so we’ll break down the common categories.

Along the way we’ll look at vocabulary types we already have in the C++ standard library that can help us move more of our code into the realm of the Rule of 0.

Come with us on a journey through these rules, type categories and behaviours and start to make sense of lifetimes in modern C++.
---

Slides: github.com/CppCon/CppCon2024/blob/main/Presentations/Back_to_Basics_Lifetime_Management.pdf

Work at Hudson River Trading (HRT): tinyurl.com/safxfctf
---

Phil Nash

Phil is the original author of the C++ test framework, Catch2. He's an independent trainer and consultant. He's also a member of the ISO C++ standards committee, organiser of C++ London and C++ on Sea, as well as co-host and producer of CppCast. More generally he's an advocate for good testing practices, TDD and using the type system and functional techniques to reduce complexity and increase correctness. He's previously worked in Finance and Mobile offers training and coaching in C++ and TDD.
---

CppCon is the annual, week-long face-to-face gathering for the entire C++ community. The conference is organized by the C++ community for the community. You will enjoy inspirational talks and a friendly atmosphere designed to help attendees learn from each other, meet interesting people, and generally have a stimulating experience. Taking place this year in Aurora, Colorado, near the Denver airport, and including multiple diverse tracks, the conference will appeal to anyone from C++ novices to experts.
Annual CppCon Conference - cppcon.org
linkedin.com/company/cppcon
https://x.com/cppcon
facebook.com/CppConference
reddit.com/r/cppcon
https://mastodon.social/@CppCon
---

Videos Filmed & Edited by Bash Films: BashFilms.com
YouTube Channel Managed by Digital Medium Ltd: events.digital-medium.co.uk
---

#backtobasics #cpp #cplusplus #cppcon #cppprogramming #cplusplusprogramming #softwaredevelopment #softwareengineering #coding #code #computerscience #technology #programming #programmer
Back to Basics: Lifetime Management in Cpp - Phil Nash - CppCon 2024Lightning Talk: Chplx - Bridging Chapel and C++ for Enhanced Asynchronous Many-Task ProgrammingUsing Modern C++ to Build XOffsetDatastructure - Zero-Encoding & Zero-Decoding Serialization LibraryA Case-study in Rewriting a Legacy Gui Library for Real-time Audio Software in Modern C++ (Reprise)Upgrading Sea of Thieves From C++14 to C++20 Wasnt Easy Heres Why - Keith Stockdale - CppCon 2025Lightning Talk: Can `set_value` Actually Throw? - Robert Leahy - CppCon 2025Lightning Talk: Saturday Is Coming Faster - Convert year_month_day to Weekday Faster - Part 2C++ Data Structures That Make Video Games Go Round - Al-Afiq Yeong - CppCon 2024Whats New for C++ in VS Code: CMake Improvements and GitHub Copilot Agents - Alexandra KemperCan std::expected with Monadic Operations REALLY Boost Your C++ Code Performance? - Vitaly FanaskovModern C++ Development: Limitations and Problems in std::function and Similar Constructs - CppCon 24Lightning Talk: Causal Inference for Code Writing AI - Matt K Robinson - CppCon 2025
CppCon |

Back to Basics: Lifetime Management in Cpp - Phil Nash - CppCon 2024

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER