[libcxx-commits] [PATCH] D112660: [libc++] Use addressof in forward_list.
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 27 13:36:15 PDT 2021
Quuxplusone added inline comments.
================
Comment at: libcxx/include/forward_list:183
#include <__config>
#include <__utility/forward.h>
#include <algorithm>
----------------
Consider adding `#include <__memory/addressof.h>` here.
================
Comment at: libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_pred.addressof.compile.pass.cpp:22
+ std::forward_list<operator_hijacker> l;
+ l.merge(l, std::less<operator_hijacker>());
+}
----------------
The comment on line 11 is talking about `forward_list&& x`, but here you're passing lvalue `l`. Which is correct? And should there be two test cases, one for lvalues and one for rvalues?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112660/new/
https://reviews.llvm.org/D112660
More information about the libcxx-commits
mailing list