3 #include <unordered_set>
14 template <
typename Key,
typename Hash,
typename KeyEqual,
typename Alloc>
15 struct hash<unordered_set<Key, Hash, KeyEqual, Alloc>>
17 using type = unordered_set<Key, Hash, KeyEqual, Alloc>;
35 template <
typename Key,
typename Hash,
typename KeyEqual,
typename Alloc>
37 has(
const std::unordered_set<Key, Hash, KeyEqual, Alloc>& s,
const Key& k)
39 return s.find(k) != std::end(s);
43 template <
typename Key,
typename Hash,
typename KeyEqual,
typename Alloc>
44 std::unordered_set<Key, Hash, KeyEqual, Alloc>
46 const std::unordered_set<Key, Hash, KeyEqual, Alloc>& s2)
48 if (s2.size() < s1.size())
52 auto res = std::unordered_set<Key, Hash, KeyEqual, Alloc>{};
53 for (
const auto& e : s1)
Container set_intersection(const Container &s1, const Container &s2)
The intersection of two sets.
size_t operator()(const type &ss) const
ATTRIBUTE_PURE bool has(const boost::container::flat_set< Key, Compare, Allocator > &s, const Key &e)
Whether e is member of s.
unordered_set< Key, Hash, KeyEqual, Alloc > type