[clang] [Clang] Check constraints for an explicit instantiation of a member function (PR #104438)

via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 15 07:40:46 PDT 2024


cor3ntin wrote:

> Actually, there is one more thing I just noticed. What about this (https://godbolt.org/z/vE4cEEEqs):
> 
> ```c++
> template <int N>
> struct A {
>     void g() __attribute__((enable_if(false, "foo"))) {}
> };
> 
> template struct A<2>;
> ```
> 
> This currently also compiles, but should be ill-formed for the same reason. Not really related to concepts per se, but the fix should be in the same place.

do you mean something like https://godbolt.org/z/4s6YEcrfa ?

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


More information about the cfe-commits mailing list