@@ -112,11 +112,6 @@ class sparse_map {
112
112
return try_emplace_base (iter, key, std::forward<Args>(args)...);
113
113
}
114
114
115
- template <typename ... Args>
116
- auto try_emplace (iterator iter, size_t key, Args&&... args) {
117
- return try_emplace_base (iter, key, std::forward<Args>(args)...);
118
- }
119
-
120
115
void erase (KeyT key) {
121
116
auto it = lower_bound (key);
122
117
if (it != end () && it->first == key) {
@@ -157,21 +152,6 @@ class sparse_map {
157
152
}
158
153
}
159
154
160
- // TODO merge with above
161
- template <typename ... Args>
162
- auto try_emplace_base (const iterator& it, KeyT key, Args&&... args) {
163
- if (it != end () && it->first == key) {
164
- return std::make_pair (it, false );
165
- } else {
166
- auto x = data_.emplace (
167
- it,
168
- std::piecewise_construct,
169
- std::forward_as_tuple (key),
170
- std::forward_as_tuple (std::forward<Args>(args)...));
171
- return std::make_pair (x, true );
172
- }
173
- }
174
-
175
155
std::vector<Entry> data_;
176
156
};
177
157
0 commit comments