title: Passing a Constructor to a Function
body: <p>I am using an STL vector that is a vector of Parameters.</p>
  
  <pre><code>std::vector&lt;Parameter&gt; foo;
  </code></pre>
  
  <p>I was trying to find a way to add Parameter objects to the vector without doing this:</p>
  
  <pre><code>Parameter a;
  foo.push_back(a);
  </code></pre>
  
  <p>I came across an implementation that did this:</p>
  
  <pre><code>foo.push_back(Parameter()); //Using the Parameter constructor
  </code></pre>
  
  <p>I thought that when I created an object the constructor is called not vise versa. Why can I pass a constructor to a function?</p>