Contract Assertions on Virtual Functions
Details
The next Berlin C++ Meetup hosted by think-cell takes place on Tuesday, May 26.
Join us for an evening with the Berlin C++ community! This meetup is a chance to step away from your day to day work, meet other developers, exchange ideas, and have real conversations about modern C++ in a relaxed setting.
--------------------------------
## Talk
### Contract assertions on virtual functions
Timur Doumler – Citadel Securities
Contracts assertions were introduced in C++26, but they cannot be applied to virtual functions. To close this gap, we first need to answer the question: how should contracts assertions behave in the presence of inheritance and runtime polymorphism?
In this talk, Timur explores why this problem is harder than it looks. He reviews existing approaches from other languages, such as Eiffel, D, and Ada, highlights why they don’t fully translate to C++, and outlines the key design challenges involved.
He then presents a concrete proposal for how contract assertions on virtual functions could work in C++, balancing correctness, safety, and usability.
Along the way, the talk touches on good API design, the true meaning of the Liskov substitution principle, and how to reason about program correctness.
--------------------------------
📅 Date & Time: Tuesday, May 26, 2026 – 18:30–21:30
📍 Location: Le Wagon Coding Bootcamp, Rudi-Dutschke-Straße 26, 10969 Berlin
🕒 Agenda
18:30 – Doors open
19:00 – Talk + Q&A
20:40 – Pizza, Drinks and Networking
--------------------------------
RSVP now to save your seat!
