24 Dec
2013
24 Dec
'13
5:17 p.m.
I'm sure the answer to (a) is that it is correct, but I was surprised that atomic<int> relied on the volatile modifier for thread safe load/stores on MSVC, I had assumed that something more than that would have been required, but I know I'm out of date on this stuff!
"volatile" was changed in VC++ 8.0 to guarantee acquire/release semantics, then changed back in 2012 to only do so when /volatile:ms is active, which it is by default, except on ARM.
So does this mean that Boost.Atomic is perhaps not safe after all? John.