feat(util/rb_map): add unsigned_map
This commit is contained in:
parent
7465529445
commit
e6fbbbbc2d
3 changed files with 6 additions and 4 deletions
|
|
@ -73,7 +73,7 @@ name mk_local_decl_name();
|
|||
class metavar_context;
|
||||
|
||||
class local_context {
|
||||
typedef rb_map<unsigned, local_decl, unsigned_cmp> idx2local_decl;
|
||||
typedef unsigned_map<local_decl> idx2local_decl;
|
||||
unsigned m_next_idx;
|
||||
name_map<local_decl> m_name2local_decl;
|
||||
subscripted_name_set m_user_names;
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ struct key_equivalence_ext : public environment_extension {
|
|||
unsigned m_rank;
|
||||
};
|
||||
|
||||
unsigned m_next_idx;
|
||||
rb_map<unsigned, node, unsigned_cmp> m_nodes;
|
||||
name_map<node_ref> m_to_node;
|
||||
unsigned m_next_idx;
|
||||
unsigned_map<node> m_nodes;
|
||||
name_map<node_ref> m_to_node;
|
||||
|
||||
node_ref mk_node() {
|
||||
node_ref r = m_next_idx;
|
||||
|
|
|
|||
|
|
@ -127,4 +127,6 @@ template<typename K, typename T, typename CMP, typename F>
|
|||
void for_each(rb_map<K, T, CMP> const & m, F && f) {
|
||||
return m.for_each(f);
|
||||
}
|
||||
|
||||
template<typename T> using unsigned_map = rb_map<unsigned, T, unsigned_cmp>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue