do not click

Meeting C++ 2024   |  Online   |  Training   |  Books   |  Survey   |  Job fair   |  Advertising   |  Jobposting   |  Login

Meeting C++ 2024 - Classes C++23 style

Conference | Live Schedule | Talks | Get your ticket | Set your timezone

Classes C++23 style

Join session

Sebastian Theophil

On Day 1 at 17:15 (CET/Berlin) in Track B [Opal Room and online]

Classes are maybe the most important language-feature of C++. It was originally called "C with classes" after all! Classes in C++ have constructors, destructors, base classes, template arguments, attributes etc. But that is just syntax. When we write and read code, a class should have meaning! It represents a value, a container, a resource or a state machine. Starting from these different use cases, I will show the best C++23 practices to define common types of classes. How do we define and constrain the life-cycle of an object? What special member functions should a class define or not define? What are regular types? What are standard layout types? I will cover the spaceship operator, conditionally explicit conversions, C++26 contracts, reference-qualified member functions and deducing this. By starting from common use-cases, I hope to show not only how to use these C++ features but when to use them.

Please login to comment

Copyright Meetingcpp GmbH Imprint Privacy Policy