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

Yang Fan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 7 04:55:21 PST 2020


nullptr.cpp added inline comments.


================
Comment at: clang/include/clang/Sema/Sema.h:4626
     CES_AllowExceptionVariables = 4,
-    CES_FormerDefault = (CES_AllowParameters),
-    CES_Default = (CES_AllowParameters | CES_AllowDifferentTypes),
-    CES_AsIfByStdMove = (CES_AllowParameters | CES_AllowDifferentTypes |
-                         CES_AllowExceptionVariables),
+    CES_AllowRValueReferenceType = 8,
+    CES_ImplicitlyMovableCXX11CXX14CXX17 =
----------------
Quuxplusone wrote:
> I believe `RValue` should be spelled `Rvalue`, throughout.
There are already names such as `RValueReferenceType`, so be consistent with existing code.


================
Comment at: clang/test/CXX/class/class.init/class.copy.elision/p3.cpp:28
+private:
+  C(C &&); // cxx20-note {{declared private here}}
+};
----------------
[over.match.funcs]p8:
> A defaulted move special member function that is defined as deleted is excluded from the set of candidate functions in all contexts.

So in this case still use private.


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