================ @@ -70,7 +70,14 @@ struct alignas(ConstraintAlignment) AtomicConstraint { // We do not actually substitute the parameter mappings into the // constraint expressions, therefore the constraint expressions are // the originals, and comparing them will suffice. - if (ConstraintExpr != Other.ConstraintExpr) + if (AC.ConstraintExpr != Other.AC.ConstraintExpr) + return false; + + // FIXME: As the normalization cache doesn't take + // ArgumentPackSubstitutionIndex into account, + // this won't have an effect. + if (AC.ArgumentPackSubstitutionIndex != + Other.AC.ArgumentPackSubstitutionIndex) ---------------- mizvekov wrote:
I think in this case the constraint was expanded, the pack index should be part of the mapping. A different pack index is notionally a different template parameter, or at least another slot where a different template argument could be located, so the different treatment wrt to non-pack parameters doesn't seem consistent to me. Though it's possible this doesn't make a difference in practice. I failed to come up with an example where this would really matter, ie make something ill-formed where it's not, or vice-versa. https://github.com/llvm/llvm-project/pull/132626 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits