From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 56D8F3858D33; Tue, 6 Feb 2024 17:15:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 56D8F3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707239709; bh=alfpOiJezCDDZ838BemqJZ9tsYPdtVaY7W6JNnxPkjs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ED5xg1Fhs4u6IGbxDE0xNFHmtNx144b5tDMNpF9KEzQ8D9c2HQSD5O/FDbNapnDyj dTvRwZnTQRwRRUryN5fi7DWDVMbj0bwxh3w9GZFRrnas4FRMPprqpfK3ZPAbWc+V1u MSIBiDmcFETiH/tnxAfFW2iJUTBE3VV/VRxcLIc8= From: "jakub at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: accepts-invalid, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113788 --- Comment #1 from Jakub Jelinek --- Seems it is far more cases where we allow it: struct S { int a, b; }; struct U { void foo () { this int g =3D 1; } }; this auto h =3D 1; int main () { S s =3D { 1, 2 }; short t[3] =3D { 3, 4, 5 }; this auto &[a, b] =3D s; this auto &[c, d, e] =3D t; this int f =3D 1; for (this auto &i : t) ; }=