Skip to content

Commit de63790

Browse files
committed
Portability fixes, take 3
1 parent 7f81d9f commit de63790

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
8080
#gcc containers
8181
for gcc, container in gcc_cont_map.items():
82-
containers.append({'container': container, 'module': gcc >= 14,
82+
containers.append({'container': container, 'module': gcc > 14,
8383
'jobname': f'Linux - GCC{gcc}'})
8484
8585

test/test_ref_counted.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <vector>
99
#include <stdexcept>
1010
#include <thread>
11-
#include <functional>
1211

1312
#if ISPTR_USE_MODULES
1413
import isptr;
@@ -196,7 +195,7 @@ TEST_CASE( "Atomic") {
196195
std::atomic<int> errors{0};
197196

198197
for (int i = 0; i < N_THREADS; ++i) {
199-
std::function<void()> fn = [&shared, i, &errors](){
198+
threads.emplace_back([&shared, i, &errors]{
200199
for (int j = 0; j < N_OPS; ++j) {
201200
if ((j & 1) == 0) {
202201
auto v = shared.load();
@@ -205,8 +204,7 @@ TEST_CASE( "Atomic") {
205204
shared.store(make_refcnt<Foo>(i * N_OPS + j));
206205
}
207206
}
208-
};
209-
threads.emplace_back(fn);
207+
});
210208
}
211209
for (auto& t : threads) t.join();
212210
CHECK(errors.load() == 0);

0 commit comments

Comments
 (0)