Skip to content

Commit

Permalink
merge bitcoin#21920: improve macro for testing -latomic requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvg committed Jun 25, 2024
1 parent 78db324 commit cae5496
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build-aux/m4/l_atomic.m4
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ dnl warranty.
m4_define([_CHECK_ATOMIC_testbody], [[
#include <atomic>
#include <cstdint>
#include <chrono>
using namespace std::chrono_literals;
int main() {
std::atomic<bool> lock{true};
std::atomic_exchange(&lock, false);
std::atomic<std::chrono::seconds> t{0s};
t.store(2s);
std::atomic<int64_t> a{};
int64_t v = 5;
Expand Down

0 comments on commit cae5496

Please sign in to comment.