title: How is "int main(){(([](){})());}" valid C++?
body: <p>I recently came across the following esoteric piece of code.</p>
  
  <pre><code>int main(){(([](){})());}
  </code></pre>
  
  <p>Reformat it as follows to make it more readable:</p>
  
  <pre><code>int main(){
      (([](){})());   //  Um... what?!?!
  }
  </code></pre>
  
  <p>But I can't get my head around how <code>(([](){})())</code> is valid code.</p>
  
  <ul>
  <li>It doesn't look like function pointer syntax.</li>
  <li>It can't be some operator overloading trick. The code compiles as is.</li>
  </ul>
  
  <p>Google didn't help much with this all-symbol search. But it compiles in Visual Studio 2010 and outputs nothing. There were no errors, and no warnings. So it looks like valid code.</p>
  
  <p>I've never seen any valid code that is so bizarre outside of <a href="https://stackoverflow.com/q/7202157/922184">Javascript</a> and <a href="https://stackoverflow.com/q/8249483/922184">C function pointers</a>.</p>
  
  <p>Can someone explain how this is valid C++?</p>