https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102610

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Related question for the last paper:
https://github.com/cplusplus/draft/issues/6536
Other than that, I guess opening a new sk_lambda scope in
cp_parser_lambda_declarator_opt at the start and leaving it at the end should
be easy,
but we only build_capture_proxy later on.  Shall we pushdecl into the sk_lambda
scope
instead the LAMBDA_CAPTURE_EXPLICIT_P && !DECL_NORMAL_CAPTURE_P captures and
somehow special-case them in name lookup or just finish_decltype_type where we
currently handle
the
      if (outer_automatic_var_p (expr)
          && current_function_decl
          && LAMBDA_FUNCTION_P (current_function_decl))
        type = capture_decltype (expr);
case?  Though, in the lambda declarator, current_function_decl is still the
containing function and outer_automatic_var_p also will not work.  I guess we
need some way to know whether we are in the lambda declarator (and also whether
it is before the end of
parameter declarations or after and whether in the latter case the lambda is
mutable or not) and special case in that case both the init-captures and
automatic? vars from the current function (which will be outer vars in lambda
body).

Reply via email to