[libcxx-commits] [libcxx] [libcxx] improves diagnostics for containers with bad value types (PR #106296)
Christopher Di Bella via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 5 16:51:54 PDT 2024
================
@@ -1024,6 +1029,15 @@ template <class _Key,
class _Pred = equal_to<_Key>,
class _Alloc = allocator<pair<const _Key, _Tp> > >
class _LIBCPP_TEMPLATE_VIS unordered_map {
+ // TODO(#106635): replace with _LIBCPP_CHECK_CONTAINER_VALUE_TYPE_REQUIREMENTS
+ // Remember to remove relevant headers when this is completed.
----------------
cjdb wrote:
I think MS/STL is allowing these as an extension? The linked wording from #106635 already prohibits `unordered_map<int, int&>`. We weren't catching it before, and have been Hyrum's Law'd.
https://github.com/llvm/llvm-project/pull/106296
More information about the libcxx-commits
mailing list