Commit 7bf39a5
authored
[ADT] Refactor SmallVector::assertSafeToAddRange with "constexpr if" (llvm#160004)
This patch consolidates two implementations of assertSafeToAddRange
into a single template function.
The new implementation uses "constexpr if" to check for pointer
iterators, preserving the original behavior while simplifying the
code.1 parent 591e60b commit 7bf39a5
1 file changed
+9
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
220 | 224 | | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | 225 | | |
227 | 226 | | |
228 | 227 | | |
| |||
0 commit comments