title: warning: passing NULL to non-pointer argument of ‘std::thread::thread
body: <p>The function I want to run:</p>
  
  <pre><code>struct foo;
  void bar(const foo* p = 0);
  </code></pre>
  
  <p>How I call the function:</p>
  
  <pre><code>auto thread = std::thread(&amp;bar, NULL);
  </code></pre>
  
  <p>The warning:</p>
  
  <blockquote>
    <p>foobar.h:223:9: warning: passing NULL to non-pointer argument 2 of ‘std::thread::thread(_Callable&amp;&amp;, _Args&amp;&amp; ...) [with _Callable = void (*)(const foo*), _Args = {int}]’ [-Wconversion-null]</p>
  </blockquote>
  
  <p>What am I missing here?</p>
  
  <p>When I call the function with non-<code>NULL</code> argument, the warning goes away.</p>