17 #ifndef AWALI_MISC_MAP_HH
18 # define AWALI_MISC_MAP_HH
30 template <
typename Key,
typename Value,
typename Compare,
typename Alloc>
31 struct hash<
map<Key, Value, Compare, Alloc>>
33 size_t operator()(
const map<Key, Value, Compare, Alloc>& m)
const
36 for (
const auto& kv: m)
50 template <
typename Key,
typename Value,
typename Compare,
typename Alloc>
53 has(
const std::map<Key, Value, Compare, Alloc>& s,
const Key& e)
55 return s.find(e) != std::end(s);
59 template <
typename ValueSet>
60 class less :
public std::less<typename ValueSet::value_t>
64 using value_t =
typename valueset_t::value_t;
adapter of std::less to wrap less_than method of valuesets
Definition: map.hh:61
typename valueset_t::value_t value_t
Definition: map.hh:64
bool operator()(const value_t &lhs, const value_t &rhs) const
Definition: map.hh:66
ValueSet valueset_t
Definition: map.hh:63
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.
Definition: tuple.hh:134
bool has(const std::map< Key, Value, Compare, Alloc > &s, const Key &e)
Definition: map.hh:53
RatExpSet::ratexp_t less_than(const RatExpSet &rs, const typename RatExpSet::ratexp_t &v)
Definition: less_than.hh:166
Main namespace of Awali.
Definition: ato.hh:22
size_t operator()(const map< Key, Value, Compare, Alloc > &m) const
Definition: map.hh:33
void hash_combine(std::size_t &seed, const T &v)
Definition: hash.hh:27