15 template <
typename Key,
typename Value,
typename Compare,
typename Alloc>
16 struct hash<
map<Key, Value, Compare, Alloc>>
18 size_t operator()(
const map<Key, Value, Compare, Alloc>& m)
const
21 for (
const auto& kv: m)
35 template <
typename Key,
typename Value,
typename Compare,
typename Alloc>
38 has(
const std::map<Key, Value, Compare, Alloc>& s,
const Key& e)
40 return s.find(e) != std::end(s);
44 template <
typename Key,
typename Value,
typename Comp,
typename Alloc>
45 std::set<typename std::map<Key, Value, Comp, Alloc>::mapped_type>
46 image(
const std::map<Key, Value, Comp, Alloc>& m)
48 std::set<typename std::map<Key, Value, Comp, Alloc>::mapped_type>
res;
49 for (
const auto& p: m)
std::set< typename std::map< Key, Value, Comp, Alloc >::mapped_type > image(const std::map< Key, Value, Comp, Alloc > &m)
The set of values of a map.
ATTRIBUTE_PURE bool has(const boost::container::flat_set< Key, Compare, Allocator > &s, const Key &e)
Whether e is member of s.
auto map(const std::tuple< Ts... > &ts, Fun f) -> decltype(map_tuple_(f, ts, make_index_sequence< sizeof...(Ts)>()))
Map a function on a tuple, return tuple of the results.
void hash_combine(std::size_t &seed, const T &v)
size_t operator()(const map< Key, Value, Compare, Alloc > &m) const