On 2/25/20 4:09 PM, Nathan Sidwell wrote:
We consider all TYPE_ARGUMENT_PACKS distinct types, leading to problems
with redeclarations.
This patch fixes things by:
a) marking all such types for structural comparison
b) teaching structural_comptypes how to compare them.
1) It appears that NONTYPE_ARGUMENT_PACKS just work, I think because we
just compare TREE_OPERANDs, which dtrt.
2) I don't think the ARGUMENT_PACK_INCOMPLETE_P and
ARGUMENT_PACK_EXPLICIT_ARGS affect the comparison, (icbw?)
I'll apply to trunk shortly, unless someone indicates I'm confused.
I'd think that the bug is that we're treating them as types in the first
place; they aren't types, so they shouldn't reach comptypes. I'd lean
toward adding an assert to that effect and fixing the caller to use e.g.
template_args_equal.
Jason