
hi peter,
Clang has std::atomic though, doesn't it?
probably not unless you enable c++11. clang/c++11/osx does not work on 10.6 (it does not ship a c++11 compliant standard library) and clang/c++11/linux doesn't have a working std::thread implementation.
Actually, it seems to support the even better __atomic intrinsics:
http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html
again, this requires gcc-4.7 ... what about people who are stuck at an older compiler? apple/gcc is probably still shipping 4.2, which does not even implement __sync primitives in a portable manner ... of course, if the compiler implements std::atomic, there is absolutely no need for boost::atomic in the first place ... the whole point is to provide a compatibility layer to provide c++11-style atomics for old compilers, that don't support c++11 atomics ... which, btw is one of the reason why the original author decided to use inline assembly instead of compiler intrinsics tim