17 May
2013
17 May
'13
1:46 a.m.
I would be happy to help if I can. We at least need libc++ (_LIBCPP_VERSION should be defined if so), atomics have been around there since 3.1, although I'm not sure the best way to ensure they are available on the given system. One way to go is:
#if defined( BOOST_CLANG ) #if __has_include( <atomic> ) // we're good #endif #enfif
although in my own code I just rely on if _LIBCPP_VERSION is there since I am using apple's toolchains.
hmm, maybe checks for both would be needed. e.g. some compilers have <atomic>, but don't implement it completely ... quite a mess ... so i'm rather conservative about using std::atomic (clang/libstdc++ might cause some problems) ... but enabling std::atomic via _LIBCPP_VERSION is probably safe ... cheers, tim