I learned that C++26 has a reflection API:
https://en.cppreference.com/cpp/meta/reflection
Like any reflection API, some of it is a bit scary (like ‘identifier_of’, which reminds me of R), but some of it is impressive, like this example that queries aliasing info:
https://en.cppreference.com/cpp/meta/object_of