title: Resolving ambiguous overload on function pointer and std::function for a lambda using + (unary plus)
body: <p>In the following code, the first call to <code>foo</code> is ambiguous, and therefore fails to compile.</p>
  
  <p>The second, with the added <code>+</code> before the lambda, resolves to the function pointer overload.</p>
  
  <pre><code>#include &lt;functional&gt;
  
  void foo(std::function&lt;void()&gt; f) { f(); }
  void foo(void (*f)()) { f(); }
  
  int main ()
  {
      foo(  [](){} ); // ambiguous
      foo( +[](){} ); // not ambiguous (calls the function pointer overload)
  }
  </code></pre>
  
  <p>What is the <code>+</code> notation doing here?</p>