title: bitwise AND with std::atomic<bool>
body: <p>I have an error status boolean that is read/written by multiple threads. It is initially set to true, then should be set to false if any operation fails.</p>
  
  <p>I wanted to use a bitwise AND like so:</p>
  
  <pre><code>std::atomic&lt;bool&gt; status;
  
  status &amp;= func1();
  status &amp;= func2();
  </code></pre>
  
  <p>but <code>operator&amp;=</code> is not allowed between <code>std::atomic&lt;bool&gt;</code> and <code>bool</code>.</p>
  
  <p>I have been able to use <code>std::atomic&lt;int&gt;</code> as work-around to get the same result, but I'm worried that I could have introduced a bug.</p>
  
  <p>Is there a way to get operator&amp; working, or the only viable syntax to use check the return value of func1()/func2() and overwrite status to false please?</p>