C++: Strongly Happens Before?
Strongly Happens Before? It started innocently enough. I just wanted to brush up on C++ memory orderings. It’s been a while since I last stared into the abyss of std::atomic , so I figured, why not revisit some good ol’ std::memory_order mayhem? Then I saw it. Strongly happens before. Wait, what? When did we get a stronger version of happens before? Turns out, it has been there for quite some time (since C++20 in fact), and it’s actually solving a very real problem in the memory model. If yo