jcsxky wrote:

> Note that @jcsxky has a similar patch #102554 that fixes the same thing. I 
> don't intend to contend against him, and admittedly, that patch works.
> 
> But I don't think that approach is so reasonable because it is hacky in that 
> `ForConstraintInstantiation` is disabled in the presence of 
> `ClassTemplateDecl`s, which seemingly does a superfluous job that 
> `getTemplateInstantiationArgs()` should do and blurs the meaning of the flag.
> 
> That would also leave us a concern about whether we should change all the 
> other lines where `ForConstraintInstantiation` was true to the same pattern 
> in `SubstituteConstraintExpressionWithoutSatisfaction`.

The approach in this patch does not work on the following case:
```cpp
template<typename>
concept Constrained = true;

template <typename T>
class C
{
    template<Constrained>
    class D;
};

template <>
template <Constrained>
class C<int>::D
{
};
```
while mine does.

https://github.com/llvm/llvm-project/pull/102587
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to