antangelo wrote:

When `SubstType` is called on the `const inner &` parameter to substitute the 
outer template args, it eventually calls `FindInstantiatedDecl` on the inner 
template pattern. The presence of the explicit deduction guide causes the outer 
template to already be instantiated at this point.

As a result `FindInstantiatedDecl` attempts to look for the inner template 
within the instantiated outer template. This fails because the inner template 
args are not known (so the inner template cannot have been instantiated at this 
point).

I think that in this case, if the decl passed into `FindInstantiatedDecl` is a 
`CXXRecordDecl` with a described template, and its context is dependent at the 
given template arguments' level, `FindInstantiatedDecl` should return the 
template pattern. Does that make sense, or is it off the mark?

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

Reply via email to