[clang] [Clang] Diagnose invalid function types in dependent contexts (PR #138731)

via cfe-commits cfe-commits at lists.llvm.org
Fri May 9 02:56:08 PDT 2025


cor3ntin wrote:

@ayermolo @yuxuanchen1997 I am afraid you might have been relying on a bug.
https://compiler-explorer.com/z/3fscWss38 shows that sfinae works properly.

In your code, there is no sfinae that I can see - consider a similar code to your example that produce a diagnostic
https://godbolt.org/z/vbq9cYqsv

Notice also that edg reject your code https://godbolt.org/z/bGf9bxY7K

Here is an implementation without using concepts, stealing the experimental ts detection idiom
https://godbolt.org/z/WoWjo66ja  

https://en.cppreference.com/w/cpp/experimental/is_detected


@mizvekov @zygoloid 



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


More information about the cfe-commits mailing list