Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libc++][vector<bool>] Tests shrink_to_fit requirement. (llvm#98009)
`vector<bool>`'s shrink_to_fit implementation is using the "swap-to-free-container-resources-trick" which only shrinks when the input vector is empty. Since the request to shrink_to_fit is non-binding, this is a valid implementation. It is not a high-quality implementation. Since `vector<bool>` is not a very popular container the implementation has not been changed and only a test to validate the non-growing property has been added. This was discovered while investigating llvm#95161. (cherry picked from commit c2e4386)
- Loading branch information