You can play with reflection with the latest GCC on compiler explorer.
The usual enum to string example, https://godbolt.org/z/aKc8Ebza4