2 ms·
I don’t think that would work. If every element of a vector can have its own allocator, and you later do v.erase(v.end() - 1); how would the vector know it
by Someone 4y ago
I don’t think that would work.
If every element of a vector can have its own allocator, and you later do
v.erase(v.end() - 1);
how would the vector know it has to call BobFree? The class _could_ store that with each element, but for small element sizes, that’s quite a bit of overhead.