We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 463e61a commit de7f531Copy full SHA for de7f531
libc/test/src/stdlib/SortingTest.h
@@ -301,7 +301,10 @@ class SortingTest : public LIBC_NAMESPACE::testing::Test {
301
// incorrect association between alignment and element size.
302
alignas(1) uint8_t buf[BUF_SIZE];
303
304
- const auto fill_buf = [&buf](size_t elem_size) {
+ // GCC still requires capturing the constant ARRAY_INITIAL_VALS in the
305
+ // lambda hence, let's use & to implicitly capture all needed variables
306
+ // automatically.
307
+ const auto fill_buf = [&](size_t elem_size) {
308
for (size_t i = 0; i < BUF_SIZE; ++i) {
309
buf[i] = 0;
310
}
0 commit comments