mirror of
https://github.com/changkun/modern-cpp-tutorial.git
synced 2025-12-17 12:44:40 +03:00
14 lines
211 B
C++
14 lines
211 B
C++
#include <atomic>
|
|
#include <iostream>
|
|
|
|
struct A {
|
|
float x;
|
|
int y;
|
|
long long z;
|
|
};
|
|
|
|
int main() {
|
|
std::atomic<A> a;
|
|
std::cout << std::boolalpha << a.is_lock_free() << std::endl;
|
|
return 0;
|
|
} |