On 7/20/23 12:00, Patrick Palka wrote:
On Wed, 19 Jul 2023, Jason Merrill wrote:
On 7/19/23 14:05, Patrick Palka wrote:
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for
trunk/13?
-- >8 --
Since the arguments 'pargs' passed to the coerce_template_parms from
coerce_template_template_parms are always a full set, we need to make sure
we always pass the parameters of the most general template because if the
template is partially instantiated then the levels won't match up.
Hmm, so then my comment "In that case we might end up adding more levels than
needed, but that shouldn't be a problem; any args we need to refer to are at
the right level." is wrong for auto template parms?
I suppose, but only for the ttp case I think? It seems all is well when
passing an ordinary template as a ttp as long as we use the parameters of the
most general template for the coercion. I can't come up with a counterexample
at least.
Agreed; the quoted comment is already only about passing a TTP, as
ordinary templates always have DECL_CONTEXT set properly.
Jason