Consider the following code:
int nonatom = 0; std::atomic atom{0}; // thread 1 nonatom = 1; atom.store(1, std::memory_order_release); // thread 2