alexander-shaposhnikov added a comment.

I've debugged a bit what's going on in https://godbolt.org/z/7h3sPe85h
we pass ForConstaintInstantiation=true and this causes 
us for the in-class FunctionTemplateDecl pick up the outer layer of template 
args (i.e. MLTAL will contain NumRetainedOuterLevels: 0 0: <T2>), while for the 
out-of-line FunctionTemplateDecl MLTAL is empty. This breaks the comparison 
(after the substitution) since Clang thinks that it's removing one layer of 
template args. For example, if we pass ForConstaintInstantiation=true the code 
will compile.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146178

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

Reply via email to