public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/82980] [9/10/11/12 Regression] template keyword should not be required for captured decl of the "base" type since r6-6866-gff2faafcf689b6c2 Date: Thu, 14 Apr 2022 18:52:10 +0000 [thread overview] Message-ID: <bug-82980-4-ZRD1rHZjcI@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-82980-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82980 --- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>: https://gcc.gnu.org/g:74b2e20222cf4fb24b90561ddb6f0989738bb722 commit r12-8165-g74b2e20222cf4fb24b90561ddb6f0989738bb722 Author: Jason Merrill <jason@redhat.com> Date: Thu Apr 14 08:16:45 2022 -0400 c++: lambda and the current instantiation [PR82980] When a captured variable is type-dependent, we've expressed the type of the capture field and proxy with a decltype variant. But if the type is "the current instantiation", we need to be able to see that so that we can do lookup inside it just like we could with the captured variable itself. I also tried looking through lambda capture in cp_parser_postfix_dot_deref_expression, but this way seems cleaner. I plan to treat more types as deducible in stage 1. I considered also using this in do_auto_deduction, but think that would be wrong: [temp.dep.expr] says an id-expression is type-dependent if it is "associated by name lookup with a variable declared with a type that contains a placeholder type where the initializer is type-dependent". That doesn't clearly exclude deducing a dependent type from the initializer, but it seems like a barrier, and other implementations agree. PR c++/82980 gcc/cp/ChangeLog: * lambda.cc (type_deducible_expression_p): New. (lambda_capture_field_type): Check it. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/lambda/lambda-current-inst1.C: New test.
next prev parent reply other threads:[~2022-04-14 18:52 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-82980-4@http.gcc.gnu.org/bugzilla/> 2021-12-22 3:44 ` [Bug c++/82980] [9/10/11/12 Regression] template keyword should not be required for captured decl of the "base" type pinskia at gcc dot gnu.org 2021-12-22 3:47 ` pinskia at gcc dot gnu.org 2022-01-17 9:00 ` rguenth at gcc dot gnu.org 2022-01-31 16:00 ` [Bug c++/82980] [9/10/11/12 Regression] template keyword should not be required for captured decl of the "base" type since r6-6866-gff2faafcf689b6c2 marxin at gcc dot gnu.org 2022-04-14 18:52 ` cvs-commit at gcc dot gnu.org [this message] 2022-04-14 18:56 ` [Bug c++/82980] [9/10/11 " jason at gcc dot gnu.org 2022-04-29 21:24 ` cvs-commit at gcc dot gnu.org 2022-05-12 20:14 ` cvs-commit at gcc dot gnu.org 2022-05-12 21:24 ` [Bug c++/82980] [9/10 " cvs-commit at gcc dot gnu.org 2022-05-12 21:34 ` jason at gcc dot gnu.org
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-82980-4-ZRD1rHZjcI@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: linkBe 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).