First it did compile but failed to link but only if I actually used operator[] (Not sure if I used the same compile options both time). I tried upgrading my version of gcc and now this code doesn't even compile. It says that std::hash is not specialized for type E.
> I guess I just have to specialize std::hash for my enum classes
Required only if we want to use a custom hash algorithm - something different hash from std::hash<int>. Otherwise, we can just specify std::hash<int> as a non-defaulted template parameter: