On Wed, Jan 18, 2017 at 11:08 PM, Adam Butcher <a...@jessamine.co.uk> wrote:
> Hi Jason,
>
> I've reopened 64382 and unhooked it from 61636
> (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64382#c6).
>
> This is a rebase of my original patch for 64382 from April 2015 against latest
> master.

This is OK as a workaround.  For GCC 8 I think we need to change how
we represent lambdas in templates: we shouldn't build up the closure
type at all until instantiation time, so we can do proper name
resolution (and to fix lambdas in pack expansions).

> My query about caching parsing_default_capturing_generic_lambda_in_template()
> still applies.  It is currently called once for each id-expression that is
> dependent but its result will be consistent within a particular lambda body.
> It feels like we should compute the state once when entering a lambda body and
> refer to the cached state thereafter (resetting/restoring it on descent/return
> from each lambda we come across).

The function looks pretty cheap, so I don't think caching it is necessary.

Jason

Reply via email to