[libcxx-commits] [PATCH] D135548: [libc++] Implement c++20 shared_ptr rvalue overloads.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 18 11:18:40 PDT 2022
Mordante added inline comments.
================
Comment at: libcxx/include/__memory/shared_ptr.h:594
+#if _LIBCPP_STD_VER > 20
+ template <class _Yp>
----------------
jwakely wrote:
> Mordante wrote:
> > pateldeev wrote:
> > > Mordante wrote:
> > > > Mordante wrote:
> > > > > Please update the synopsis too.
> > > > We (and other vendors) typically backport LWG-issue, can you do that for this issue too.
> > > I think back-porting to c++17 will break code that does a `std::move()` but relies on the fact that no move happens. Arguable this a just a bug in user code, but probably still something we don't want to change?
> > I don't feel that we should guard against users doing bad things; updating their code to C++20 will break that scenario.
> >
> > I see MSVC STL applied this change unconditionally, but libstdc++ limits it to C++20 and newer.
> >
> > @jwakely is there a reason for not backporting LWG-2996 to older versions?
> >
> I don't remember why I only added it for C++20, but probably because it's questionable whether there was a defect. It seems more like an evolutionary change (which is why it went through LEWG) than a defect fix.
> I don't remember why I only added it for C++20, but probably because it's questionable whether there was a defect. It seems more like an evolutionary change (which is why it went through LEWG) than a defect fix.
Thanks for the information. Then it makes sense to me to do the same in libc++. @pateldeev please leave a comment why this LWG issue isn't backported to earlier language versions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135548/new/
https://reviews.llvm.org/D135548
More information about the libcxx-commits
mailing list