Special Member Functions in C++ - Kris van Rens - C++ on Sea 2023
https://cpponsea.uk/ --- Special Member Functions in C++ - Kris van Rens - C++ on Sea 2023 All class types in C++ have a set of non-static special member functions. Among them is the constructor, destructor, copy constructor and copy assignment operator. In C++11, move semantics were introduced, and the move constructor and move assignment operator were introduced. Special member functions, when not defined explicitly, may be automatically generated by the compiler. But this is not always the case. Exactly when are they defined, and when not? What is the rule of all or zero? And is it any good? Did you know there are about eight different forms of constructors? And when it comes to copy/move operations, do you know when you need to implement them yourself? And how? In this session, I will guide you through the wonderful world of special member functions. We will look into definition rules, constructor forms, copy/move operations, implementation idioms, and testing of special member functions. Also, we will take a look at some commonly encountered situations involving special member functions, such as class state initialization/reinitialization, and how to create consistent implementations for these cases. As a C++ software engineer equipped with a clear understanding of special member functions, you will be more confident and effective. --- Slides: https://github.com/philsquared/cppons... Sponsored by think-cell: https://www.think-cell.com/en/ --- Kris van Rens Ever since the first time Kris got in touch with his dad's 1983 ZX Spectrum, he was captivated by the wonderful world of computer programming. In 1995, he learned to program 'Pacman' in x86 real-time assembly, which was soon followed by learning C and then C++, which came to be his bread and butter. He is very serious about code quality and is mostly interested in C++, Rust, Linux, programming languages/paradigms, software architecture and performance optimization. He currently works as the lead developer at ViNotion in Eindhoven (NL) and as a trainer at High Tech Institute Eindhoven. If he is not working, coding for fun or doing dad-/husband-related things, he is probably playing the guitar or running out in the woods. Kris studied mechatronics at FH Niederrhein, Krefeld (DE), and electrical engineering at the TU/e in Eindhoven (NL). He can be contacted at [email protected] --- C++ on Sea is an annual C++ and coding conference, in Folkestone, in the UK. Annual C++ on Sea, C++ conference: https://cpponsea.uk/ 2023 Program: https://cpponsea.uk/2023/schedule/ Twitter: / cpponsea --- YouTube Videos Filmed, Edited & Optimised by Digital Medium: https://events.digital-medium.co.uk #cpp #cpponsea #cppprogramming

So, You Want to Use C++ Modules … Cross-Platform? - Daniela Engert - C++ on Sea 2023

The worst programming language of all time

C Programming and Memory Management - Full Course

*(char*)0 = 0; - What Does the C++ Programmer Intend With This Code? - JF Bastien - C++ on Sea 2023

Back To Basics: The Special Member Functions - Klaus Iglberger - CppCon 2021

Casey Muratori – The Big OOPs: Anatomy of a Thirty-five-year Mistake – BSC 2025

C++ Features You Might Not Know - Jonathan Müller - C++ on Sea 2023

BeCPP Symposium 2026 - Herb Sutter - C++ Growing in a world of competition, safety, and AI

Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup

Turing Award Winner: Disagreeing with Google, Postgres, Future Problems | Mike Stonebraker

Back to Basics: Understanding Value Categories - Ben Saks - CppCon 2019

Branchless Programming in C++ - Fedor Pikus - CppCon 2021

"Clean" Code, Horrible Performance

C++ Memory Model: from C++11 to C++23 - Alex Dathskovsky - CppCon 2023

Typical C++, but Why? - Björn Fahller - C++ on Sea 2023

Jonathan Blow - Jai Demo and Design Explanation (KEYNOTE) - Updated

Back to Basics: Initialization in C++ - Ben Saks - CppCon 2023

What Happens After The Compiler in C++ (How Linking Works) - Anders Schau Knatten - C++ on Sea 2023

