Loading…
Thursday September 19, 2024 14:00 - 15:00 MDT
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++.
Speakers
avatar for Phil Nash

Phil Nash

Yak Shaver, Shaved Yaks Ltd
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... Read More →
Thursday September 19, 2024 14:00 - 15:00 MDT
Maple 3/4/5

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Share Modal

Share this link via

Or copy link