title: Objective-C++ 11 - Why can't we assign a block to a lambda?
body: <p>So, I just upgraded to Xcode 4.4, and I noticed in the changelog: </p>
  
  <blockquote>
    <p>Apple LLVM compiler supports additional C++11 features, including lambdas</p>
  </blockquote>
  
  <p>Which is awesome! So I got around to coding, and I found a few things out:</p>
  
  <ol>
  <li><p>Lambdas are assignable to Objective-C blocks:</p>
  
  <pre><code>void (^block)() = []() -&gt; void { 
      NSLog(@"Inside Lambda called as block!");
  };
  
  block();
  </code></pre></li>
  <li><p><code>std::function</code> can hold an Objective-C block:</p>
  
  <pre><code>std::function&lt;void(void)&gt; func = ^{
      NSLog(@"Block inside std::function");
  };
  
  func();
  </code></pre></li>
  <li><p>We cant assign an Objective-C block to a lambda:</p>
  
  <pre><code>auto lambda = []() -&gt; {
      NSLog(@"Lambda!");
  };
  
  lambda = ^{ // error!
      NSLog(@"Block!");
  };
  
  lambda();
  </code></pre></li>
  </ol>
  
  <p>Why is this? Shouldn't the two be semantically equivalent, given what we've seen above?</p>