I'm reading the cpp reference manual on std::atomic (https://en.cppreference.com/w/cpp/atomic/atomic) and I'm confused about the exact operations that are actually executed atomically.
The main operations I'm having trouble with:
operator=, operator+, and operator+=
I know that these operations are defined for the template I'm just unsure if and when they actually are atomic. I'd appreciate help understanding when an operation on such a variable is atomic and not.
Edit:
I've read the question referenced here:
What exactly is std::atomic? and I'm still confused. For example, say a is an atomic int. Is a+=100 equivalent to a.fetch_add(100)?
In the same line of questioning, is a.load(100) equivalent to a=100?