[clang] [Clang] Diagnose defaulted assignment operator with incompatible object parameter (PR #70176)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 30 05:12:11 PDT 2023


================
@@ -7748,6 +7748,24 @@ bool Sema::CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD,
         HadError = true;
       }
     }
+    // [C++23][dcl.fct.def.default]/p2.2
----------------
AaronBallman wrote:

This requirement seems to be a general one but you've implemented it as being specific to the copy and move assignment operators; can you not have this same situation with other operators (like comparisons, etc)?

https://github.com/llvm/llvm-project/pull/70176


More information about the cfe-commits mailing list