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