[libcxx-commits] [PATCH] D117917: [libc++] Use addressof in unordered_set.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 21 12:29:21 PST 2022
Quuxplusone accepted this revision.
Quuxplusone added a comment.
LGTM if CI is green!
================
Comment at: libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.addressof.compile.pass.cpp:9
+
+// UNSUPPORTED: c++03
+
----------------
This line can be removed, can't it?
(Ditto throughout, probably. Please investigate each UNSUPPORTED and remove the ones that can be removed.)
================
Comment at: libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.addressof.compile.pass.cpp:26-32
+ using A = test_allocator<operator_hijacker>;
+ using H = std::hash<operator_hijacker>;
+ using P = std::equal_to<operator_hijacker>;
+
+ const A a;
+ std::unordered_multiset<operator_hijacker, H, P, A> so;
+ std::unordered_multiset<operator_hijacker, H, P, A> s(std::move(so), a);
----------------
This is good just for extra test coverage, but FWIW/FYI, I'm pretty sure you could have just done something like
```
std::unordered_multiset<operator_hijacker> so;
std::unordered_multiset<operator_hijacker> s(std::move(so), so.get_allocator());
```
without all the extra params.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117917/new/
https://reviews.llvm.org/D117917
More information about the libcxx-commits
mailing list