Skip to content

Commit 95f6bdc

Browse files
committed
Refactor test_concur_concurrent.cpp to fix compilation errors
1 parent c1dc10e commit 95f6bdc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/concur/test_concur_concurrent.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ TEST(concurrent, broadcast_multi_dirtywrite) {
319319
using namespace concur;
320320

321321
struct data {
322-
std::uint64_t n{};
322+
std::uint64_t n;
323323

324324
data &operator=(test::latch &l) noexcept {
325325
l.arrive_and_wait();
@@ -338,15 +338,15 @@ TEST(concurrent, broadcast_multi_dirtywrite) {
338338
prod_cons<trans::broadcast, relation::multi, relation::multi> pc;
339339
typename traits<decltype(pc)>::header hdr {imp::make_span(circ)};
340340

341-
auto push_one = [&, ctx = typename concur::traits<decltype(pc)>::context{}](auto &i) mutable {
341+
auto push_one = [&, ctx = typename concur::traits<decltype(pc)>::context{}](auto &&i) mutable {
342342
return pc.enqueue(imp::make_span(circ), hdr, ctx, i);
343343
};
344344
auto pop_one = [&, ctx = typename concur::traits<decltype(pc)>::context{}]() mutable {
345345
data i;
346346
if (pc.dequeue(imp::make_span(circ), hdr, ctx, i)) {
347347
return i;
348348
}
349-
return data{};
349+
return data{0};
350350
};
351351

352352
test::latch l(2);

0 commit comments

Comments
 (0)