Skip to content

Commit

Permalink
Refactor test_concur_concurrent.cpp to fix compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mutouyun committed Aug 11, 2024
1 parent c1dc10e commit 95f6bdc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/concur/test_concur_concurrent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ TEST(concurrent, broadcast_multi_dirtywrite) {
using namespace concur;

struct data {
std::uint64_t n{};
std::uint64_t n;

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

auto push_one = [&, ctx = typename concur::traits<decltype(pc)>::context{}](auto &i) mutable {
auto push_one = [&, ctx = typename concur::traits<decltype(pc)>::context{}](auto &&i) mutable {
return pc.enqueue(imp::make_span(circ), hdr, ctx, i);
};
auto pop_one = [&, ctx = typename concur::traits<decltype(pc)>::context{}]() mutable {
data i;
if (pc.dequeue(imp::make_span(circ), hdr, ctx, i)) {
return i;
}
return data{};
return data{0};
};

test::latch l(2);
Expand Down

0 comments on commit 95f6bdc

Please sign in to comment.