I need to refactor some C++ code that needs some accesses to become atomic.
std::atomic
is nice, but can be assigned from and converted to value_type
, which means that existing call sites are taken over without complaint.
Is there a variant of std::atomic that requires me to explicitly call load()
/store()
/compare_exchange_weak
everywhere?