https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115852
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- /* The TI_ARGS of a regenerated lambda contains only the innermost set of template arguments. Augment this with the outer template arguments that were used to regenerate the lambda. */ gcc_assert (!args || TMPL_ARGS_DEPTH (args) == 1);