[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:04:54 PDT 2023


AaronBallman wrote:

> Per https://eel.is/c++draft/dcl.fct.def.default#2.2, the explicit object parameter of a defaulted special member function must be of the same type as the one of an equivalent implicitly defaulted function, ignoring references.

I could use an explanation as to how they must be the same type when 2.2 says "...may be an explicit object member function whose explicit object parameter is of (possibly different) type “reference to C”, in which case..."

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


More information about the cfe-commits mailing list