Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That can do almost anything (including reallocating), so you can’t really rely on it:

“Requests the container to reduce its capacity to fit its size.

“The request is non-binding, and the container implementation is free to optimize otherwise and leave the vector with a capacity greater than its size.

“This may cause a reallocation, but has no effect on the vector size and cannot alter its elements.”



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: