Перейти к содержимому

Reflection in C++?! - MIchael Hava

Using std::cpp

0:00 / 0:00

Reflection in C++?! - MIchael Hava

1 333 просмотра · 1 год назад
Using std::cpp
3,84 тыс. подписчиков
1 333 просмотра · 1 год назад
The next C++ standard is scheduled to introduce official support for reflection. But what if we need reflection NOW and don’t want to use external code generators? As it turns out, there is a way to do a subset of the features slated for C++26 already … using the dark arts of meta-programming and exploiting implementation-defined behavior. This approach to reflection forms the basis for popular libraries like magic_enum and Boost.PFR. This talk will present how to do reflection in C++23 and earlier and uncover the mystery of how the aforementioned libraries work internally.