[all-commits] [llvm/llvm-project] ef8389: [libc++][test] Fix zero-length arrays and copy-pas...
Stephan T. Lavavej via All-commits
all-commits at lists.llvm.org
Mon Jan 29 02:55:48 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ef83894810db8ec72489f1b45bf943938f6b0af4
https://github.com/llvm/llvm-project/commit/ef83894810db8ec72489f1b45bf943938f6b0af4
Author: Stephan T. Lavavej <stl at nuwen.net>
Date: 2024-01-29 (Mon, 29 Jan 2024)
Changed paths:
M libcxx/test/std/algorithms/alg.nonmodifying/alg.contains/ranges.contains.pass.cpp
Log Message:
-----------
[libc++][test] Fix zero-length arrays and copy-pasted lambdas in `ranges.contains.pass.cpp` (#79792)
* 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".
More information about the All-commits
mailing list