Hopefully that will be fixed in a future C++ standard. There is an interesting static reflection proposal floating around that would allow for this, plus more.
The talk about the reflection proposal was amazing. Meta classes are also very cool. We can only hope it comes fast.