1 #ifndef VCSN_MISC_MAP_HH
2 # define VCSN_MISC_MAP_HH
14 template <
typename Key,
typename Value,
typename Compare,
typename Alloc>
15 struct hash<
map<Key, Value, Compare, Alloc>>
17 size_t operator()(
const map<Key, Value, Compare, Alloc>& m)
const
20 for (
const auto& kv: m)
22 hash_combine(res, kv.first);
23 hash_combine(res, kv.second);
32 template <
typename Key,
typename Value,
typename Compare,
typename Alloc>
35 has(
const std::map<Key, Value, Compare, Alloc>& s,
const Key& e)
37 return s.find(e) != std::end(s);
40 template <
typename ValueSet>
41 class less :
public std::less<typename ValueSet::value_t>
45 using value_t =
typename valueset_t::value_t;
55 #endif // !VCSN_MISC_MAP_HH
size_t operator()(const map< Key, Value, Compare, Alloc > &m) const
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.
typename valueset_t::value_t value_t
bool operator()(const value_t &lhs, const value_t &rhs) const
RatExpSet::value_t less_than(const RatExpSet &rs, const typename RatExpSet::value_t &v)
bool has(const std::map< Key, Value, Compare, Alloc > &s, const Key &e)