What is Atomic::castTo for? Is it the work-around so that Atomic<> can function with unsigned integers as the Type? Its showing up in debug profiles. There are serious performance implications for technique of using a union in the implementation of castTo. Are you sure this code is optimal?
I had to jump through some ridiculous hoops to find a way to make all that stuff compile the same way on the different compilers, and I remember not being able to make it work without the union.
Actually, there's scope to make those classes use the new official C++11 atomics where possible, I must look into that soon.