title: Assigning pointer to lambda function to pointer to another lambda function
body: <p>I am trying to assign a pointer to lambda function to pointer to another lambda function. The code will speak for itself:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  int main(int argc, char *argv[]) {
  
      auto l1 = []() { std::cout &lt;&lt; "Lambda 1!" &lt;&lt; std::endl; };
      auto l2 = [] { std::cout &lt;&lt; "Lambda 2!" &lt;&lt; std::endl; };
  
      auto l1p = &amp;l1;
      l1p = &amp;l2; // Why can't I do this assignment?
      return 0;
  }
  </code></pre>
  
  <p>Since the return types and argument of both lambda functions are the same, why can't I do this assignment?</p>