[clang] [clang] Fix partial specialization matching for NTTPs of placeholder type (PR #225239)
Valentyn Yukhymenko via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 23 14:58:51 PDT 2026
================
@@ -8040,7 +8040,10 @@ bool ASTContext::isSameTemplateArgument(const TemplateArgument &Arg1,
getCanonicalTemplateName(Arg2.getAsTemplateOrTemplatePattern());
case TemplateArgument::Integral:
- return llvm::APSInt::isSameValue(Arg1.getAsIntegral(),
+ // The types have to match as well as the values:
+ // C++ [temp.type]p2
----------------
BaLiKfromUA wrote:
Added in https://github.com/llvm/llvm-project/pull/225239/commits/4e6ef2d94490ff84b9f4f45a07898472a219b62d
I guess you didn't find it in the C++26 draft because it's `[temp.typE]`, not `[temp.typeS]`.
But fair feedback regardless
https://github.com/llvm/llvm-project/pull/225239
More information about the cfe-commits
mailing list