[all-commits] [llvm/llvm-project] c2e438: [libc++][vector<bool>] Tests shrink_to_fit require...
Mark de Wever via All-commits
all-commits at lists.llvm.org
Tue Jul 23 09:03:50 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c2e438675754b83c31d7d5ba40cb13fe77e795de
https://github.com/llvm/llvm-project/commit/c2e438675754b83c31d7d5ba40cb13fe77e795de
Author: Mark de Wever <koraq at xs4all.nl>
Date: 2024-07-23 (Tue, 23 Jul 2024)
Changed paths:
M libcxx/test/std/containers/sequences/vector.bool/shrink_to_fit.pass.cpp
Log Message:
-----------
[libc++][vector<bool>] Tests shrink_to_fit requirement. (#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 #95161.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list