public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/102610] [C++23] P2036R3 - Change scope of lambda trailing-return-type
Date: Thu, 31 Aug 2023 11:38:44 +0000	[thread overview]
Message-ID: <bug-102610-4-eeHl700Wlc@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102610-4@http.gcc.gnu.org/bugzilla/>

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).

      parent reply	other threads:[~2023-08-31 11:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05 16:13 [Bug c++/102610] New: " mpolacek at gcc dot gnu.org
2022-08-16 16:16 ` [Bug c++/102610] " mpolacek at gcc dot gnu.org
2023-08-31 11:38 ` jakub at gcc dot gnu.org [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-102610-4-eeHl700Wlc@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).