Overview
Explore techniques for replacing runtime polymorphism with compile-time polymorphism in C++20, eliminating the need for virtual functions in statically linked programs. Delve into the mechanisms of modern C++ that achieve the same purposes as virtual functions, and gain insights into when and why to avoid or remove them from a codebase. Learn about binding interfaces, polymorphic types, virtual and non-virtual implementations, storing multiple types, properties, vectors, and implementations. Examine the downsides and bold claims surrounding devirtualization, and engage in a practice task to reinforce your understanding. Presented by Jonathan Gopel, a C++ enthusiast and outdoor sports enthusiast, at CppCon 2022, this hour-long conference talk offers a comprehensive exploration of advanced C++ concepts for experienced programmers looking to optimize their code.
Syllabus
Introduction
Binding interfaces
Usage
Polymorphic Types
Virtual Implementation
NonVirtual Implementation
Storing Multiple Types
Properties
Vectors
Implementations
Review
Downsides
Bold Claim
Devirtualization
Comments
Practice Task
Taught by
CppCon