mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
build: improve macro for testing -latomic requirement
This commit is contained in:
parent
94f83534e4
commit
fa25ce45e9
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue