Suppose I have the following class:
class A { public: ... ... void incrementN() {++n_;} uint64_t getN() {return n_;} private: std::atomic<uint64_t> n_; ... ... };
Suppose that I initialize all other variables in the class except n_ , and that this is not a streaming local storage, so zero initialization is missing.
I create an object of class A and keep calling incrementN() .
If at some point I want the value n_ and I call getN() , can this cause the load() procedure to fail for atomic n_ ?
source share