title: Using a C++ lambda expression without parentheses
body: <p>I am learning lambda expressions in c++ and coming from Pascal I tend to leave out parentheses at functions without parameters. So I didn't set them for a lambda expression without parameters and it always returns <code>1</code>.</p>
  <pre><code>#include &lt;iostream&gt;
  
  int main(){ 
      
      auto test = [](){return &quot;bla&quot;;};
   
      std::cout&lt;&lt;test()&lt;&lt;&quot;  &quot;&lt;&lt;test &lt;&lt;'\n';
  }
  </code></pre>
  <p>Since there also no warnings with <code>-Wall</code> is this intended? If so, why is is it <code>1</code>?</p>