std::atomic support in g++ 4.4.3

2019-04-28 12:29发布

问题:

I am using g++ version 4.4.3 on Ubuntu OS. According to this matrix here it is supposed to support also std::atomic. Each time I use

 #include <atomic>

the compiler gives me an error and says error: atomic: No such file or directory.

Have you experienced the same problem? I am compiling using the following line

    g++ -std=c++0x -Wall myCode.cpp -o myApp</code>

回答1:

Try #include <cstdatomic> instead.



标签: c++11 g++ atomic