Skip to content

Commit fa25ce4

Browse files
author
MarcoFalke
committed
build: improve macro for testing -latomic requirement
1 parent 94f8353 commit fa25ce4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

build-aux/m4/l_atomic.m4

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,17 @@ dnl warranty.
1212
m4_define([_CHECK_ATOMIC_testbody], [[
1313
#include <atomic>
1414
#include <cstdint>
15+
#include <chrono>
16+
17+
using namespace std::chrono_literals;
1518
1619
int main() {
1720
std::atomic<bool> lock{true};
1821
std::atomic_exchange(&lock, false);
1922
23+
std::atomic<std::chrono::seconds> t{0s};
24+
t.store(2s);
25+
2026
std::atomic<int64_t> a{};
2127
2228
int64_t v = 5;

0 commit comments

Comments
 (0)