3 ms·
The used size is end - begin; the capacity is stored in addition. That’s why sizeof(std::vector<T>) is 24 on x86-64.
by stochastic_monk 8y ago
The used size is end - begin; the capacity is stored in addition. That’s why sizeof(std::vector<T>) is 24 on x86-64.