std::map is usually implemented as a red-black tree. A set. More specificallym, std::set is a red-black tree and std::map is basically a std::set<std::pair<key,value>>
If you're actually looking for something faster than O(log N) then consider a hash table (unordered_set)