I am defining an atomic variable of a struct type and the code compiles fine, but when I call the load()
method on the atomic variable, I get a symbol lookup error. What am I doing wrong?
struct Foo
{
double baz;
double bar;
};
std::atomic<Foo> atomic_foo {Foo {1.0, 2.0}};
auto foo {atomic_foo.load()}; // <-- symbol lookup error: undefined symbol: __atomic_load