std::unordered_set of custom enum might work better. Switched to c++11