[libcxx-commits] [libcxx] [libc++] Update container adaptors' type verification tests (PR #224810)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Sat Sep 19 17:37:07 PDT 2026


================
@@ -85,8 +85,10 @@ class flat_map {
   template <class, class, class, class, class>
   friend class flat_map;
 
-  static_assert(is_same_v<_Key, typename _KeyContainer::value_type>);
-  static_assert(is_same_v<_Tp, typename _MappedContainer::value_type>);
+  static_assert(is_same_v<_Key, typename _KeyContainer::value_type>,
+                "The stored elements key type must match the underlying container's key value_type.");
+  static_assert(is_same_v<_Tp, typename _MappedContainer::value_type>,
+                "The stored elements mapped type must match the underlying container's mapped 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");
----------------
Zingam wrote:

I have a follow-up for this. I tried to submit it as a stacked PR but I got an error that I don't have access. So I'll submit it as usual after this.

https://github.com/llvm/llvm-project/pull/224810


More information about the libcxx-commits mailing list