do not click

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

Meeting C++ 2026 - When Your Compiler Runs Your Code

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

When Your Compiler Runs Your Code

Join session

Books by Andreas Fertig

Notebook C++: Tips and Tricks with Templates
Programming with C++20 - Concepts, Coroutines, Ranges, and more

Andreas Fertig

On Day 2 at 13:15 (CET/Berlin) in Track A [Saphir Room and online]

constexpr started as a way to compute simple values at compile time. Today, it is one of the defining features of modern C++. With every standard since C++11, the things you can do during compilation have expanded. In C++26, compile-time programming reaches an entirely new level with static reflection.

In this talk, we will explore how constexpr evolved from its early restrictions to the powerful toolset available today. You will see what actually happens during constant evaluation, which guarantees the language provides, and where the pitfalls still hide.

Using practical examples, we will examine how constexpr evolved from a restricted compile-time mechanism into a feature that increasingly blurs the line between compile time and runtime execution.

Especially since C++20 and the introduction of std::is_constant_evaluated, developers can now write code that behaves differently depending on when it executes. While powerful, this also introduces new challenges for correctness, testing, and maintainability. We will explore where these differences matter, how to reason about them, and what modern C++ developers need to watch out for.

Finally, we will look at C++26 static reflection and how compile-time introspection pushes constexpr programming even further. Reflection enables entirely new approaches for serialization and code generation, all during compilation.

By the end of this talk, you will understand when compile-time execution is beneficial, where its limits are, and how modern constexpr can simplify and strengthen your code.

Please login to comment

Copyright Meetingcpp GmbH Imprint Privacy Policy