r/cpp • • Feb 17 '26

Pushback on the C++ memory ordering model

0 Upvotes

How many people are there in the world who feel they have a thorough understanding of the Standard C++ memory ordering model? It seems both unnecessarily elaborate, but also too vague. It seems much more straightforward to specify that memory write events are caused by one thread, but occur in all threads, just not necessarily in the same order. Fenced atomic writes and standalone fences in the causing thread restrict the ordering of the memory writes it causes in other threads. I took a stab at trying to write something up: https://wkaras.github.io/CppMemOrder.html . Feedback welcome.