title: My attempt at value initialization is interpreted as a function declaration, and why doesn't A a(()); solve it?
body: <p>Among the many things Stack Overflow has taught me is what is known as the "most vexing parse", which is classically demonstrated with a line such as</p>
  
  <pre><code>A a(B()); //declares a function
  </code></pre>
  
  <p>While this, for most, intuitively appears to be the declaration of an object <code>a</code> of type <code>A</code>, taking a temporary <code>B</code> object as a constructor parameter, it's actually a declaration of a function <code>a</code> returning an <code>A</code>, taking a pointer to a function which returns <code>B</code> and itself takes no parameters. Similarly the line</p>
  
  <pre><code>A a(); //declares a function
  </code></pre>
  
  <p>also falls under the same category, since instead of an object, it declares a function. Now, in the first case, the usual workaround for this issue is to add an extra set of brackets/parenthesis around the <code>B()</code>, as the compiler will then interpret it as the declaration of an object</p>
  
  <pre><code>A a((B())); //declares an object
  </code></pre>
  
  <p>However, in the second case, doing the same leads to a compile error</p>
  
  <pre><code>A a(()); //compile error
  </code></pre>
  
  <p>My question is, why? Yes I'm very well aware that the correct 'workaround' is to change it to <code>A a;</code>, but I'm curious to know what it is that the extra <code>()</code> does for the compiler in the first example which then doesn't work when reapplying it in the second example. Is the <code>A a((B()));</code> workaround a specific exception written into the standard?</p>