rsmith added a comment.

In D147722#4249612 <https://reviews.llvm.org/D147722#4249612>, @erichkeane 
wrote:

> Hmmm... the examples I thought would cause a problem don't seem to when 
> switching that to Done.  So I'm going to run regression tests and give that a 
> shot.
>
> I think I now get what you mean about 'Identity' arguments, we basically need 
> to have arguments to keep something like the above example (where 'foo' is a 
> template, and the partial specialization is done correctly), and when trying 
> to substitute into it, we would end up having the arguments to `Outer` and 
> `Foo`, but substitution would think of the `Foo` args as the `Inner` args for 
> depth.  I'm giving the testing a shot, and will see if that fixes the problem 
> without causing a regression in any of the concerns I have.  I suspect I 
> don't have a problem with the 'identity' for the same reason 'Done' works: we 
> never hit that situation.

If we know that all further levels will be "identity" levels (mapping 
template-param-i-j to template-param-i-j), then we can use 
`MultiLevelTemplateArgumentList::addOuterRetainedLevels` to represent that and 
leave those levels alone. That will mean the `getNumSubstitutedLevels() == 0` 
check in `SubstituteConstraintExpression` will fire a lot more often, which 
seems like a nice benefit.


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

https://reviews.llvm.org/D147722

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

Reply via email to