[libcxx-commits] [PATCH] D61771: Comparing Unordered Containers (P0809)

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 9 17:48:19 PDT 2019


zoecarver marked 2 inline comments as done.
zoecarver added a comment.

Maybe I should add some fail tests for pre-c++20?



================
Comment at: include/unordered_map:1641
+#if _LIBCPP_STD_VER > 17
+template <class _Key, class _Tp, class _Hash1, class _Pred, class _Alloc1,
+                                 class _Hash2,              class _Alloc2>
----------------
Was it ever necessary for the two maps to use the same allocator type (and is it now)? Furthermore, is it even necessary for them to have the same key/value type (I don't see anything in the standard that explicitly says they need to be)? 


================
Comment at: include/unordered_map:1690
+        _EqRng __yeq = __y.equal_range(__i->first);
+        if (_VSTD::distance(__xeq.first, __xeq.second) !=
+                _VSTD::distance(__yeq.first, __yeq.second) ||
----------------
I can add some tests for this. Wanted to make sure it is correct first.


Repository:
  rCXX libc++

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61771/new/

https://reviews.llvm.org/D61771





More information about the libcxx-commits mailing list