I have a vector full of integers. I have a class that takes an integer as a constructor. I want to create a new vector full of such class, using the values in the first vector as a constructor for each.
I have a feeling my current approach could be optimized greatly.
vector<int> integers = /*something...*/;
vector<clazz> clazzes();
for(auto& n : integers)
{
clazzes.emplace_back(clazz(n));
}