title: Initializing temporary aggregate object using curly braces
body: <p>Let's say I have a class:</p>
  
  <pre><code>class Aggregate {
  
  public:
  
      int x;
      int y;
  
  };
  </code></pre>
  
  <p>I know how to initialize an object using curly braces:</p>
  
  <pre><code>Aggregate a1 = { 1500, 2900 };
  </code></pre>
  
  <p>But I can't find a proper syntax to create temporary object and pass it as an argument to some method, for example:</p>
  
  <pre><code>void frobnicate(const Aggregate&amp; arg) { 
      // do something
  }
  
  //...
  
  frobnicate(Aggregate {1500, 2900}); // what should this line look like?
  </code></pre>
  
  <p>The easiest way would be to add the constructor to Aggregate class, but let's assume I don't have an access to the Aggregate header. Another idea would be to write some kind of factory method, i.e. </p>
  
  <pre><code>Aggregate makeAggregate(int x, int y).
  </code></pre>
  
  <p>I can also create an object and then pass it as an argument, etc. etc.</p>
  
  <p>There are many solutions, but I'm just curious if it's possible to achieve this goal using curly braces initialization.</p>