abrachet added a comment. struct S { template <typename F> constexpr bool a(F&& f) const { // This works previously in clang and on gcc return f(1); // no matching function for call to object of type ... } }; template <typename> struct S1 { void f() { auto test = [] (auto) { S s; // Remove this constexpr and it compiles fine. constexpr auto f = [](auto&&) { return true; }; return s.a(f); }; test(1); } }; void a() { S1<int> s; s.f(); }
The following doesn't compile after this change (I've verified that reverting makes the issue go away). This code also compiles fine on gcc. Would you mind taking a look? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155064/new/ https://reviews.llvm.org/D155064 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits