[libcxx-commits] [PATCH] D61771: Comparing Unordered Containers (P0809)
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue May 14 09:08:58 PDT 2019
zoecarver marked 2 inline comments as done.
zoecarver added a comment.
I can do that so all the tests are "uniform".
================
Comment at: test/std/containers/unord/comp_different_hash.pass.cpp:49
+template<class T>
+size_t hash_neg (T val) { return std::numeric_limits<size_t>::max() - val; }
+template<class T>
----------------
mclow.lists wrote:
> I don't think that this does what what you want anymore.
You meant I should use `std::numeric_limits<T>::max()`?
================
Comment at: test/std/containers/unord/comp_different_hash.pass.cpp:71
+ {
+ m.insert(std::make_pair(*p1, *p2));
+ }
----------------
mclow.lists wrote:
> The first time through the loop you are dereferencing `p2`, which is equal to `end`.
Good catch. Fixed.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61771/new/
https://reviews.llvm.org/D61771
More information about the libcxx-commits
mailing list