Reflection

Get familiar with reflection that may become a part of C++23.

Reflection is the possibility of a program to analyze and modify itself. Reflection takes place at compile-time and, therefore, adheres to the C++ metarule: “don’t pay for anything you don’t use”. The type-traits library is a powerful tool for reflection, but the proposal P0385 for static reflection goes much further.

The following code snippet should give you an idea on reflection:

Get hands-on with 1200+ tech skills courses.