[libcxx-commits] [PATCH] D60540: [libc++] Make sure we don't eagerly diagnose non-const comparators for containers of incomplete types

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 11 08:53:36 PDT 2019


ldionne added inline comments.


================
Comment at: libcxx/test/libcxx/containers/unord/non_const_comparator.pass.cpp:41-42
+  // expected-no-disagnostics
+  test<std::unordered_set>();
+  test<std::unordered_multiset>();
+  test<std::unordered_map>();
----------------
EricWF wrote:
> zoecarver wrote:
> > ldionne wrote:
> > > Note: those two tests fail, I need to figure out why (tomorrow). I still wanted to get the patch out there to get feedback if there's any.
> > Looked into it a bit but can't seem to figure it out either 😕. My //guess// is that `__check_hash_requirements` is being called before `Derived` is completed (somehow).
> The map tests are incorrect. They pass `Derived*` as the key type and `std::less<Base*>` as the value type. That might be why they're passing but the `set` tests are not.
Wow, thanks. IDK what I was thinking -- this needs to be `Container<Key, Value, std::hash<Key>, std::equal_to<Key>>`. This was all wrong. The tests pass when I fix that. Like I said, this was the end of a long day!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60540





More information about the libcxx-commits mailing list