The C ++ 0x project has a section with macros in the <atomic> header, which indicates that there is no easy and portable way to check this otherwise.
29.4 Property without locking [atomics.lockfree]
#define ATOMIC_CHAR_LOCK_FREE implementation-defined #define ATOMIC_CHAR16_T_LOCK_FREE implementation-defined #define ATOMIC_CHAR32_T_LOCK_FREE implementation-defined #define ATOMIC_WCHAR_T_LOCK_FREE implementation-defined #define ATOMIC_SHORT_LOCK_FREE implementation-defined #define ATOMIC_INT_LOCK_FREE implementation-defined #define ATOMIC_LONG_LOCK_FREE implementation-defined #define ATOMIC_LLONG_LOCK_FREE implementation-defined
Macros indicate types where std :: atomic <type> can be implemented without blocking, which means that they themselves are atoms.
source share