[libcxx-commits] [PATCH] D110852: [libc++] Use addressof in assignment operator.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 5 10:22:36 PDT 2021
Quuxplusone accepted this revision as: Quuxplusone.
Quuxplusone added a comment.
LGTM % `priority_queue`.
================
Comment at: libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/assign_copy.compile.pass.cpp:23
+void test() {
+ std::priority_queue<deleted_operator_ampersand, std::vector<deleted_operator_ampersand> > pqo;
+ std::priority_queue<deleted_operator_ampersand, std::vector<deleted_operator_ampersand> > pq;
----------------
Mordante wrote:
> jloser wrote:
> > Should we explicitly `#include <vector>`? Do we even need to provide our own container template (I think using the default of `std::deque` is fine, right?)?
> `std::vector` is the default and yes we should include `<vector>`, instead I use `std::queue` which can be used without an additional include.
`std::queue` isn't even a container, let alone a random-access container. I agree with @jloser: we don't need to specify a container here. Just `std::priority_queue<operator_hijacker>` should be fine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110852/new/
https://reviews.llvm.org/D110852
More information about the libcxx-commits
mailing list