Skip to content

Commit a2834d0

Browse files
committed
Map wrappers: forward more of the std::map interface
This remains incomplete, forwarding as per users' needs rather than forwarding the entire std::map interface, hopefully splitting the difference between providing useful functionality and preserving the possibility to switch out different types without undue difficulty.
1 parent 0a668ae commit a2834d0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/pointer-analysis/value_set.h

+5
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,12 @@ class value_sett
8383
size_t size() const { return data.size(); }
8484
bool empty() const { return data.empty(); }
8585

86+
void erase(unsigned i) { data.erase(i); }
87+
void erase(iterator it) { data.erase(it); }
88+
8689
objectt &operator[](unsigned i) { return data[i]; }
90+
objectt &at(unsigned i) { return data.at(i); }
91+
const objectt &at(unsigned i) const { return data.at(i); }
8792

8893
template <typename It>
8994
void insert(It b, It e) { data.insert(b, e); }

src/util/numbering.h

+3
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ class hash_numbering final
152152
T &operator[](size_type t) { return data[t]; }
153153
const T &operator[](size_type t) const { return data[t]; }
154154

155+
T &at(size_type t) { return data.at(t); }
156+
const T &at(size_type t) const { return data.at(t); }
157+
155158
size_type size() const { return data.size(); }
156159

157160
iterator begin() { return data.begin(); }

0 commit comments

Comments
 (0)