Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'atomic_uint32_t' in namespace 'std' does not name a type Error

I have the following line in my code:

#include <atomic>

std::atomic_uint32_t tmp;

However, I am getting the following compilation error:

'atomic_uint32_t' in namespace 'std' does not name a type.

I included <cstdint> but the error persists.

My GCC version: 5.4.0, Ubuntu 14.04 (64-bit)

like image 911
Soo Avatar asked Jan 09 '17 05:01

Soo


1 Answers

As per Danh's comment, I used

std::atomic<std::uint32_t>

and voila, it is working now. Thanks Danh.

like image 57
Soo Avatar answered Nov 14 '22 23:11

Soo