[libcxx-commits] [PATCH] D153991: [libcxx] replaces `__compressed_pair` with `[[no_unique_address]]` in `unique_ptr`
Eric Fiselier via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 3 13:50:05 PDT 2023
EricWF added a comment.
It's my understanding that the clang-cl changes to support `[[no_unique_address]]` are coming down the pipe, and will hopefully be here within the quarter.
I think we should wait until that lands, and then proceed carefully.
There's still some potentially breaking ABI changes like `final` but I'm open to erroring on that or supporting it minimally.
================
Comment at: libcxx/include/__memory/unique_ptr.h:511
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void swap(unique_ptr& __u) _NOEXCEPT {
- __ptr_.swap(__u.__ptr_);
+ std::swap(__ptr_, __u.__ptr_);
+ std::swap(__deleter_, __u.__deleter_);
----------------
Shouldn't this follow the swap protocol `using std::swap`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153991/new/
https://reviews.llvm.org/D153991
More information about the libcxx-commits
mailing list