#include <iostream>
#include <atomic>
using namespace std;
typedef enum day{sun =0, mon, tue}day;
int main() {
atomic<day> a(sun);
cout<<a<<endl;
return 0;
}
The above code will try to create an enum variable as an atomic type. But I get the following error.
undefined reference to std::atomic<day>::operator day() const
Does atom have no enum type support? or any error in my syntax? I am using a g ++ compiler running on a 32-bit ubuntu 12.0.4 machine. thank.
source
share