Fastest Way to Determine if Character Belongs to a Set of Known Characters C++
问题 Given any character, what's the fastest way for me to determine if that character belongs to a set (not the container-type) of known characters. In other words, what's the fastest elegant way to implement the conditional: char c = 'a'; if(c == ch1 || c == ch2 || c == ch3 ...) // Do something... Is there an STL container (I'm thinking it might be unordered_set?) that I can just pass the character as a key to and it'll return true if the key exists? Anything with an O(1) lookup time will work