Atomic operations and types in C++