Skip to content

Commit 2016e43

Browse files
committed
Work around missing std::atomic_init before GCC 5
Fixes Amanieu#36
1 parent 927d378 commit 2016e43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/async++/continuation_vector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class continuation_vector {
120120
{
121121
// Workaround for a bug in certain versions of clang with libc++
122122
// error: no viable conversion from 'async::detail::compressed_ptr<3, true>' to '_Atomic(async::detail::compressed_ptr<3, true>)'
123-
std::atomic_init(&atomic_data, internal_data(nullptr, 0));
123+
atomic_data.store(internal_data(nullptr, 0), std::memory_order_relaxed);
124124
}
125125

126126
// Free any left over data

0 commit comments

Comments
 (0)