diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-05-11 20:10:21 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-05-11 20:07:20 +0200 |
commit | fa25ce45e9d54a2f0d5f2c0de9254d102a855a76 (patch) | |
tree | 7e4922d333f6473d7dc5c3a63863249f3b874353 /build-aux | |
parent | 94f83534e4b771944af7d9ed0f40746f392eb75e (diff) |
build: improve macro for testing -latomic requirement
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/m4/l_atomic.m4 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/build-aux/m4/l_atomic.m4 b/build-aux/m4/l_atomic.m4 index 5201a8cc7c..40639dfe61 100644 --- a/build-aux/m4/l_atomic.m4 +++ b/build-aux/m4/l_atomic.m4 @@ -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; |