Hello everyone. I would like to share with you a new method for creating compile-time key-value maps that I discovered while experimenting with the new features introduced in C++26. I will also show a new trick I call the compile-time mutable variable. I believe these methods will be very helpful in your stateful metaprogramming endeavors. Before continuing, you should have an understanding of what a reflection is and its basics. You should also know about the reflection and splice operators. If you do not, I recommend reading §4.1 and §4.2 of the “Reflection for C++26” P2996R13 [1] paper. You do not need to know the other sections, as I will explain and reference them as necessary. To understand the new method, it’s best to start by dissecting the compile-time ticket counter example (P2996R13 §3.17). If you understand how it works, you can skip this section. The examples used in this section can be found on godbolt [2].…