[libcxx-commits] [PATCH] D112836: [libc++] Transparent unordered_foo::count() should use __count_multi.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 1 08:52:37 PDT 2021
Quuxplusone planned changes to this revision.
Quuxplusone marked an inline comment as done.
Quuxplusone added a comment.
Actually, now I am much less sure that @mclow.lists's example is supposed to work, even for regular `set`.
https://godbolt.org/z/PxG5avYv1
The requirements in https://eel.is/c++draft/unord.req seem physically impossible to implement — how can we get a range `a_tran.equal_range(ke)` when those elements are not guaranteed to be stored consecutively in the container? I'll email LWG.
================
Comment at: libcxx/test/std/containers/unord/unord.set/equal_range_transparent.pass.cpp:27-30
+ bool operator()(const std::pair<int, int>& x) const {
+ return std::hash<int>()(x.first);
+ }
+ bool operator()(int x) const {
----------------
`s/bool/size_t/`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112836/new/
https://reviews.llvm.org/D112836
More information about the libcxx-commits
mailing list