Y
Hacker News
new
|
ask
|
show
|
jobs
by
thestoicattack
2709 days ago
The tradeoff is that emplace_back and push_back need to check the capacity (even though they won't reallocate because of reserve). Whereas with resize, assignments into the initialized area need no checks at all.