title: Forwarding to an Aggregate Initializer?
body: <p>It seems to me that aggregate initialization (of suitable types) is not considered a constructor that you can actually call (except a few cases.)</p>
  
  <p>As an example, if we have a very simple aggregate type:</p>
  
  <pre><code>struct Foo {
      int x, y;
  };
  </code></pre>
  
  <p>then this obviously works:</p>
  
  <pre><code>auto p = new Foo {42, 17};  // not "Foo (42, 17)" though...
  </code></pre>
  
  <p>but this doesn't work on any compiler that I've tested (including latest versions of MSVC, GCC, and Clang):</p>
  
  <pre><code>std::vector&lt;Foo&gt; v;
  v.emplace_back(2, 3);
  </code></pre>
  
  <p>Again, it seems to me that any code that wants to call the constructor for a type <code>T</code> (in this case, the code in <code>vector::emplace_back</code> that forwards the passed arguments to the c'tor of <code>T</code>,) cannot use aggregate initialization simply (it seems) because they use parentheses instead of curly braces!</p>
  
  <p>Why is that? Is it just a missed feature (nobody has proposed/implemented it yet,) or there are deeper reasons? This is a little strange, because aggregate types by definition have no other constructor to make the resolution ambiguous, so the language could have just defined a default aggregate constructor (or something) that would have all the members as defaulted arguments.</p>
  
  <p>Is it just a matter of syntax? If the implementation of <code>vector::emplace_back</code> in the above example had used placement <code>new</code> with curly braces instead of parentheses, would it have worked?</p>
  
  <p><strong>Note</strong>: I want to thank those comments who've pointed out the behavior of <code>vector</code> and <code>emplace</code> because their comments will be valuable to those who'll find this question using those keywords, but I also want to point out that those are just examples. I picked the most familiar and concise example, but my point was about explicitly calling the aggregate initializer in any code (or in <code>placement new</code>, more specifically.)</p>