[libcxx-commits] [PATCH] D119159: [libc++] Make shared_ptr move unique_ptr's deleter

Asher Mancinelli via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 9 15:12:01 PST 2022


ashermancinelli added inline comments.


================
Comment at: libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp:235
+    { // LWG 3548
+#if TEST_STD_VER > 3
+      {
----------------
Quuxplusone wrote:
> Although I'm not convinced we need anything special for C++03 here, actually. Clang //does// support rvalue references in its non-pedantic C++03 mode, which is all we support; so I'd be surprised if anything behaved differently in C++03 mode.  This seems to be an at-least-moderately-deep rabbit hole; see e.g. https://github.com/llvm/llvm-project/blob/main/libcxx/include/__memory/shared_ptr.h#L477-L481 (additional copy instead of move) and https://github.com/llvm/llvm-project/blob/main/libcxx/include/__memory/shared_ptr.h#L237 (additional move instead of nothing). @ashermancinelli, would you //like// to explore this rabbit hole? If not, I'll do it.
> 
> Re styling `TEST_STD_VER` checks: `git grep` is your friend.
> ```
> git grep -h 'TEST_STD_VER >' ../libcxx | sort | uniq -c | sort -n
> ```
I'd love to take a day or so to look into this rabbit hole, though you would likely find it first, and I won't complain if you do :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119159



More information about the libcxx-commits mailing list