C++11 borrowed heavily from the Java memory model that came before it.
It's basically everyone learning from everyone else on what works and what doesn't work.
Java deserve a lot of the credit for the happens-before concept that is the foundation of both its memory model and C++'s, but it can't express relaxed access and figuring out how to fit that in was a really big deal.
Java deserve a lot of the credit for the happens-before concept that is the foundation of both its memory model and C++'s, but it can't express relaxed access and figuring out how to fit that in was a really big deal.