title: Must I call atomic load/store explicitly?
body: <p>C++11 introduced the <a href="http://en.cppreference.com/w/cpp/atomic/atomic"><code>std::atomic&lt;&gt;</code></a> template library. The standard specifies the <code>store()</code> and <code>load()</code> operations to atomically set / get a variable shared by more than one thread.</p>
  
  <p>My question is are assignment and access operations also atomic? </p>
  
  <p>Namely, is:</p>
  
  <pre><code>std::atomic&lt;bool&gt; stop(false);
  ...
  void thread_1_run_until_stopped()
  {
      if(!stop.load())
          /* do stuff */
  }
  
  void thread_2_set_stop()
  {        
      stop.store(true);
  }
  </code></pre>
  
  <p>Equivalent to:</p>
  
  <pre><code>void thread_1_run_until_stopped()
  {
      if(!stop)
          /* do stuff */
  }
  
  void thread_2_set_stop()
  {        
      stop = true;
  }
  </code></pre>