Quuxplusone added a comment.

I've found another case that Clang has never handled correctly (and which your 
patch does not fix)—
https://godbolt.org/z/xd8qGW

  struct Widget {};
  struct Frodo {
      Frodo(Widget&);
      Frodo(Widget&&) = delete;
  };
  
  Frodo twelve() {
      Widget w;
      return w;  // according to the majority of vendors, the first pass should 
not "fail";
                 // it should successfully find the deleted overload and 
hard-error at that point.
                 // This has been the case ever since C++11, AFAIK.
  }

This example will be mentioned in my upcoming (not-yet-finished) WG21 paper 
P2266 <https://wg21.link/p2266>, as an example of why the two-pass mechanism 
sucks and should be removed from C++2b.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88220

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

Reply via email to