[PATCH] D88220: [C++20] P1825R0: More implicit moves
Arthur O'Dwyer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 2 14:57:34 PST 2020
Quuxplusone added a subscriber: davidstone.
Quuxplusone added inline comments.
================
Comment at: clang/test/CXX/class/class.init/class.copy.elision/p3.cpp:22
+ return c;
+}
+#else
----------------
Quuxplusone wrote:
> @rsmith @david_stone (or anyone), what is the status in C++20 of the following test case?
>
> C&& test(C&& c) {
> return c;
> }
>
> I know we talked about this in person at CppCon 2018, and concluded that our //intention// was for this to be legal, but that it wasn't actually legal as-worded, because the returned thingie here is not an object but rather a reference, and therefore none of [P1825's](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1825r0.html) wording actually covers it. Is that still the case? Is there an open issue about this? Is there any appetite for Clang to just go ahead and //make// this legal? (The current patch does //not// make this legal.)
>
> Relevant reading: https://quuxplusone.github.io/blog/2018/09/25/perfect-backwarding/
Apparently @davidstone has been active more recently than @david_stone... :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88220/new/
https://reviews.llvm.org/D88220
More information about the cfe-commits
mailing list