1 comment

[ 23.7 ms ] story [ 653 ms ] thread
”Must not declare new structs / classes / unions / functions / methods;”

That doesn’t mention enums yet. It should, or one could do

  enum{a,b,c,d,e,f,g,h} foo;
for arbitrary complex enums.

Also, to use typeid, you need to to #include <typeinfo>. If that’s allowed, I think #including another system header instead should be, too. That header could declare some template or struct that gains you more than typeid.