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++/113788] Deducing this is broken with structured binding
Date: Tue, 06 Feb 2024 17:15:09 +0000	[thread overview]
Message-ID: <bug-113788-4-fPROOYUANv@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113788-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Seems it is far more cases where we allow it:
struct S { int a, b; };
struct U {
  void foo () { this int g = 1; }
};
this auto h = 1;

int
main ()
{
  S s = { 1, 2 };
  short t[3] = { 3, 4, 5 };
  this auto &[a, b] = s;
  this auto &[c, d, e] = t;
  this int f = 1;
  for (this auto &i : t)
    ;
}

  parent reply	other threads:[~2024-02-06 17:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06 16:43 [Bug c++/113788] New: " hewillk at gmail dot com
2024-02-06 17:13 ` [Bug c++/113788] " mpolacek at gcc dot gnu.org
2024-02-06 17:15 ` jakub at gcc dot gnu.org [this message]
2024-02-06 17:31 ` mpolacek at gcc dot gnu.org
2024-02-06 17:34 ` jakub at gcc dot gnu.org
2024-02-06 17:48 ` jakub at gcc dot gnu.org
2024-02-06 21:35 ` cvs-commit at gcc dot gnu.org
2024-02-06 21:35 ` jakub at gcc dot gnu.org
2024-02-07  9:46 ` redi 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-113788-4-fPROOYUANv@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).