If I have a class
class foo {
public:
foo() { // spend some time and do something. }
private:
// some data here
}
Now I have a vector of foo, I want to put this vector into another vector
vector<foo> input; // assume it has 5 elements
vector<foo> output;
Is there ANY performance difference with these two lines?
output.push_back(input[0])
output.emplace_back(input[0])