我的代码中有以下行:
#include <atomic>
std::atomic_uint32_t tmp;
但是,我收到以下编译错误:
'atomic_uint32_t' in namespace 'std' does not name a type.
我包括了 <cstdint>
但错误仍然存在。
我的 GCC 版本:5.4.0,Ubuntu 14.04(64 位)
最佳答案
根据 Danh 的评论,我使用了
std::atomic<std::uint32_t>
瞧,它现在可以正常工作了。谢谢丹。
关于c++ - 命名空间 'std' 中的“atomic_uint32_t”未命名类型错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41541283/