[PATCH] D88220: [C++20] P1825R0: More implicit moves

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 13 13:52:58 PDT 2021


Quuxplusone added inline comments.


================
Comment at: clang/lib/Sema/SemaStmt.cpp:3226-3227
+    CopyElisionSemanticsKind CESK = CES_Strict;
+    if (getLangOpts().CPlusPlus20) {
+      CESK = CES_ImplicitlyMovableCXX20;
+    } else if (getLangOpts().CPlusPlus11) {
----------------
rsmith wrote:
> P1825 was accepted as a Defect Report (see https://wiki.edg.com/bin/view/Wg21cologne2019/StrawPolls); is there a reason we're not applying this retroactively?
> Move to accept the changes in P1825R0 (Merged wording for P0527R1 and P1155R3) as a Defect Report and apply them to the C++ working paper.

Yipes. @rsmith, is the intent that modern compilers should support
```
std::unique_ptr<int> from_rvalue(std::unique_ptr<int>&& x) { return x; }
```
in `-std=c++11` mode? Are Clang, GCC, MSVC, EDG all on the same page here? If so, awesome. I just find it a priori unlikely that we got informed consensus on that.


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