Commit ef83894
authored
[libc++][test] Fix zero-length arrays and copy-pasted lambdas in
* Fix MSVC error C2466: cannot allocate an array of constant size 0
+ MSVC rejects this non-Standard extension. Previous fixes: #74183
* Fix MSVC warning C4805: `'=='`: unsafe mix of type `'int'` and type
`'const bool'` in operation
+ AFAICT, these lambdas were copy-pasted, and didn't intend to take and
return `int` here. This part of the test is using `vector<bool>` for
random-access but non-contiguous iterators, and it's checking how many
times the projection is invoked, but the projection doesn't need to do
anything squirrely, it should otherwise be an identity.
* Fix typos: "continuous" => "contiguous".ranges.contains.pass.cpp (#79792)1 parent c9535d7 commit ef83894
File tree
1 file changed
+9
-8
lines changed- libcxx/test/std/algorithms/alg.nonmodifying/alg.contains
1 file changed
+9
-8
lines changedLines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | | - | |
93 | | - | |
| 93 | + | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | | - | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| |||
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
218 | | - | |
| 219 | + | |
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
222 | | - | |
| 223 | + | |
223 | 224 | | |
224 | | - | |
| 225 | + | |
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
231 | | - | |
| 232 | + | |
232 | 233 | | |
233 | | - | |
| 234 | + | |
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
| |||
0 commit comments