[libcxx-commits] [libcxx] [libc++] Flat containers should reject `vector<bool, Alloc>` (PR #224886)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 13 02:47:00 PDT 2026
================
@@ -89,8 +89,10 @@ class flat_map {
"The stored elements' key type must match the underlying key container's value_type.");
static_assert(is_same_v<_Tp, typename _MappedContainer::value_type>,
"The stored elements' mapped type must match the underlying mapped container's value_type.");
- static_assert(!is_same_v<_KeyContainer, std::vector<bool>>, "vector<bool> is not a sequence container");
- static_assert(!is_same_v<_MappedContainer, std::vector<bool>>, "vector<bool> is not a sequence container");
+ static_assert(!__is_std_vector_bool_v<_KeyContainer>,
+ "The underlying key container must not be std::vector<bool>, which is not a sequence container.");
----------------
philnik777 wrote:
```suggestion
static_assert(!__is_std_vector_bool_v<_KeyContainer>,
"The underlying key container must not be std::vector<bool> because it is not a sequence container.");
```
https://github.com/llvm/llvm-project/pull/224886
More information about the libcxx-commits
mailing list