================ @@ -78,6 +78,22 @@ class UnresolvedSetImpl; class VarTemplateDecl; enum class ImplicitParamKind; +// Holds a constraint expression along with a pack expansion index, if +// expanded. +struct AssociatedConstraint { + const Expr *ConstraintExpr = nullptr; + int ArgumentPackSubstitutionIndex = -1; ---------------- erichkeane wrote:
I was thinking about it... I'd LOVE instead (though this is a 'more work' thing :D so nothing to do here unless you'd like to ) if we just had a `std::optional` like type to represent all of these substitution/pack indexes. The difference here is that the `optional` type would just use a single value as its `unset` state instead of a separate value, so we don't pay the size cost. Additionally, we could make all of these unsigned instead of signed ints, so presumably we get a little bit of (unusable for other reasons!) range back. Also/also: serialization/etc all ends up being self-solved since they can have their own serialization/etc. https://github.com/llvm/llvm-project/pull/133190 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits