royjacobson added inline comments.

================
Comment at: clang/lib/Sema/SemaDecl.cpp:17875
+    return true;
+  if (!Context.hasSameType(M1->getParamDecl(0)->getType(),
+                           M2->getParamDecl(0)->getType()))
----------------
shafik wrote:
> What happens if we have further parameters with default arguments? Unless I 
> am missing something they are still special member functions but the proposal 
> does not seem to cover them.
That's an excellent question.

I'm not sure what to do about default arguments. In a context where the 
additional parameters matter, you're not using them as constructors anymore, 
right? So why would this affect the type traits?
On the one hand [over.match.best] is against this idea of comparing constraints 
when the parameters differ. So also every context where this actually matters 
the overload resolution would probably be ambiguous anyway?

@BRevzin, what do you think? Is the wording intentional to include copy/move 
constructors with default arguments as well?

I checked with GCC and they seem to handle default arguments separately: 
https://godbolt.org/z/1ch3M7MjP



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128619/new/

https://reviews.llvm.org/D128619

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to