[libcxx-commits] [libcxx] [libc++][test] Fix issues found by MSVC's STL (PR #131787)
Peng Liu via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 18 11:23:34 PDT 2025
================
@@ -71,7 +71,7 @@ TEST_CONSTEXPR_CXX20 bool tests() {
// Test with various allocators and different `size_type`s
{
test(std::vector<bool>());
- test(std::vector<bool, std::allocator<int> >());
+ test(std::vector<bool, std::allocator<bool> >());
----------------
winner245 wrote:
> A more general problem to me is that given vector<bool> is not an actual container, so more wording are necessary to specify which requirements of containers are also applied to it.
I agree that having a clear specification on whether the general container requirements apply to `vector<bool>` would be highly valuable, given the specialty of `vector<bool>`. Specifically, whether [[container.alloc.reqmts]/5](https://eel.is/c++draft/container.alloc.reqmts#5) applies to `vector<bool>` has significant implications: if the answer is yes, then libc++ and libstdc++ would not be conforming and need to be fixed (in a separate patch); if the answer is no, then MSVC-STL would be enforcing stricter requirements than the standard mandates.
https://github.com/llvm/llvm-project/pull/131787
More information about the libcxx-commits
mailing list