Is a comparison operation thread safe for std::atomic variables?
<p><code>std::atomic</code> has some operators like: +, -, ++, -- (post and pre) and guarantee that they are thread safe, but is comparison operations thread safe? I mean following:</p>

<pre><code>std::atomic&lt;int&gt; a = 10;
int i = 20;

void func() {
  a++; // atomic and thread safe
  if (a &gt; i) // is it thread safe? 
}
</code></pre>