4 ms·
Longest C++ Variable Declaration
- Someone 7y ago”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.