I'm having an issue calling a member function pointer that is atomic:
class test
{
typedef void(test::*ProcessPtr)();
std::atomic<ProcessPtr> _processPtr;
void process() {}
}
int main(int argc, char** argv)
{
test t;
t._processPtr = &test::process;
(t.*_processPtr)();
}
The error is:
t.cpp:238:6: error: ‘_processPtr’ was not declared in this scope (t.*_processPtr)();
Not quite sure what the issue is.. Can you not deference an "atomic" member function pointer?
test::ProcessPtr pp = t._processPtr.load();and(t.*pp)();?__atomic_store_16' t.cpp:(.text.startup+0x70): undefined reference to__atomic_load_16'