https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124490
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Though, I'm afraid it is more complicated than that. I bet we need to treat
lambdas parsed when in_expansion_stmt && !processing_template_decl as if they
were lambdas inside of a template, but what exactly is needed to achieve that,
no idea.
E.g. that decl_dependent_p uses
if (tree tinfo = get_template_info (decl))
if (any_dependent_template_arguments_p (TI_ARGS (tinfo)))
return true;
so at least for the case where for !processing_template_decl the expansion stmt
range_decl is undeduced when parsing the body, it would be good to have
get_template_info on the nested lambdas inside of it.