do not click

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

Meeting C++ 2025 - To lie... and hopefully, to lie usefully

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

To lie... and hopefully, to lie usefully

Join session

Patrice Roy

On Day 1 at 17:15 (CET/Berlin) in Track D online

We lie. We all lie. When programming, we have a cute name for lies: casts, a short name for «type casts», or those things we do when the compiler's view on the types in our program does not suit our needs.

So let's talk about casts. What they are, what they do, why they have this peculiar syntax.

In this talk, we will look at the various casts that C++ provides, including the «C cast», to know what they do and how they can be used efficiently. Then, we will see how one can write casts (yes, we can!) when these can clarify the intent in a program. Finally, we will reflect on the reasons why programmers sometimes have to lie to their compiler.

Please login to comment

Copyright Meetingcpp GmbH Imprint Privacy Policy