Commit 23a1a79
authored
SmallSet: Mark iterator parent as const (#4613)
We already assume the parent does not change,
binaryen/src/support/small_set.h
Lines 202 to 208 in 94d77ef
// std::set allows changes while iterating. For us here, though, it would
// be nontrivial to support that given we have two iterators that we
// generalize over (switching "in the middle" would not be easy or fast),
// so error on that.
if (usingFixed != other.usingFixed) {
Fatal() << "SmallSet does not support changes while iterating";
}
This also marks the parent as const to reflect that.
This fixed a weird C++ compilation error I had when working on
something unrelated, but seems worth landing independently.1 parent 94d77ef commit 23a1a79
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
0 commit comments