aaronpuchert marked 2 inline comments as done.
aaronpuchert added a comment.

This seems to be in line with our current behavior, so I hope it's right:

  struct S { S(int); };
  
  template<typename T>
  auto l = [](T x = T()) { return x; };
  
  template<typename T>
  struct Fun {
      T operator()(T x = T()) const { return x; }
  };
  
  void f() {
      l<int>();   // Ok.
      l<S>(S(0)); // Error at "T()": no matching constructor for initialization 
of 'S'
      Fun<S> f;
      f(S(0));    // Ok.
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76038



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

Reply via email to