I encounter this compiler error
function std::atomic::is_lock_free() const: error: undefined reference
to '__atomic_is_lock_free'
when compiling code like below using gcc 4.7.2 on linux.
struct S {
int a;
int b;
};
std::atomic<S> s;
cout << s.is_lock_free() << endl;
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…