Consider these two variants:
std::atomic<int> a;
a = 1;
int b = a;
and
std::atomic<int> a;
a.store(1);
int b = a.load();
I see from the documentation that the second one is fully atomic, but I don't understand when I should use which and what's the difference in detail.