Re: [PATCH] c++: templated substitution into lambda-expr [PR114393]

2024-04-12 Thread Patrick Palka
On Wed, 10 Apr 2024, Jason Merrill wrote: > On 3/27/24 10:01, Patrick Palka wrote: > > On Mon, 25 Mar 2024, Patrick Palka wrote: > > > On Mon, 25 Mar 2024, Patrick Palka wrote: > > > > > > > > The below testcases use a lambda-expr as a template argument and they > > > > all trip over the below ad

Re: [PATCH] c++: templated substitution into lambda-expr [PR114393]

2024-04-10 Thread Jason Merrill
On 3/27/24 10:01, Patrick Palka wrote: On Mon, 25 Mar 2024, Patrick Palka wrote: On Mon, 25 Mar 2024, Patrick Palka wrote: The below testcases use a lambda-expr as a template argument and they all trip over the below added tsubst_lambda_expr sanity check ultimately because current_template_par

Re: [PATCH] c++: templated substitution into lambda-expr [PR114393]

2024-04-09 Thread Patrick Palka
gt; > > > + args = add_extra_args (LAMBDA_EXPR_EXTRA_ARGS (t), args, complain, > > > in_decl); > > > + if (processing_template_decl && !in_template_context) > > > +{ > > > + /* Defer templated substitution into a lambda-

Re: [PATCH] c++: templated substitution into lambda-expr [PR114393]

2024-03-27 Thread Patrick Palka
bda-expr used as a template argument. */ > > And this comment is stale (an earlier version of the patch also deferred > for dependent arguments even when current_template_parms is non-empty, > which I backed out to make the fix as narrow as possible). FWIW I also experimented with un

Re: [PATCH] c++: templated substitution into lambda-expr [PR114393]

2024-03-25 Thread Patrick Palka
{ > + /* Defer templated substitution into a lambda-expr when arguments > + are dependent or when we lost the necessary template context, > + which may happen for a lambda-expr used as a template argument. */ And this comment is stale (an earlier version of the patch al

[PATCH] c++: templated substitution into lambda-expr [PR114393]

2024-03-25 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- The below testcases use a lambda-expr as a template argument and they all trip over the below added tsubst_lambda_expr sanity check ultimately because current_template_parms is empty, which causes push_templa