I understand how std::vector::reserve() works with vectors of primitive types:
vector<int> vec;
vec.reserve(100);
Say you created an empty vector of objects:
class A {
public:
string name;
}
vector<A> vec;
vec.reserve(100);
How does it know how much memory to reserve? Not only that, but what if class A had a container inside of it as well? Then it would be impossible to reserve the correct amount of memory right?