nixpkgs/pkgs/test/cc-wrapper/atomics.cc
Artturin dabfaef444 tests.cc-wrapper: add atomics test
`-std=c++17` is for clang 5
2023-11-16 00:23:56 +02:00

9 lines
120 B
C++

#include <atomic>
#include <cstdint>
int main()
{
std::atomic_int x = {0};
return !std::atomic_is_lock_free(&x);
}