[libcxx-commits] [libcxx] [libc++] Update container adaptors' type verification tests (PR #224810)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Sep 19 18:19:14 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.");
----------------
frederick-vs-ja wrote:
This seems applied but reverted later. Do you think it makes more sense to say "underlying container's key/mapped value_type", while there're actually 2 underlying containers and each of them has only one `value_type`?
https://github.com/llvm/llvm-project/pull/224810
More information about the libcxx-commits
mailing list