title: What is the purpose of a double negative in macro definition, like (!!(expr))?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/248693/double-negation-in-c-code">Double Negation in C++ code. </a>  </p>
  </blockquote>
  
  
  
  <p>I'm reading a code base, and find something like this:</p>
  
  <pre><code>#define uassert(msgid, msg, expr) (void)((!!(expr))||(uasserted(msgid, msg), 0))
  </code></pre>
  
  <p>I cannot figure out why <strong>(!!(expr))</strong> is used instead of a single <strong>(expr)</strong>. Anyway, a double negative means positive, is not it? Am I missing something?</p>