From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9553F3830B04; Thu, 24 Nov 2022 15:13:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9553F3830B04 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669302792; bh=72b7iYEXgbAfWU1/jCcpneqNIzVfUWtPxqSfh0qHnwQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=plf+nWF18scrBKhMeY3Xu413TeTo5cF6RFzCXDfb3CV1gc24802cQ48Ekz6z6uRLa 0lP6CYQSnq/GMTOygV/N5bvidmn5i/Fr/lN8jsDKMNBYhmmMtVEFFIlI7f0ZAGhWrY M9ApBZoDcIPzRamXkdndwmDs4WZn9wvg2SPWO3Ms= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107858] structed binding with auto type and for all loop in a template considered a type dependent name Date: Thu, 24 Nov 2022 15:13:12 +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: 11.1.1 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: bug_status everconfirmed short_desc cf_reconfirmed_on 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=3D107858 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Summary|Variable in generic lambda |structed binding with auto |incorrectly considered to |type and for all loop in a |be a dependent name |template considered a type | |dependent name Last reconfirmed| |2022-11-24 --- Comment #1 from Andrew Pinski --- This is unrelated to generic lambdas and can reproduce with just a templated function: ``` struct y { template void foo() const {} }; template struct pair { T a, b; }; template void bar(void) { pair x[10]; for (auto const &[a, b] : x) a.foo<0>(); } ``` Note the forall loop is required. I wonder if that is because begin and end are considered type depdent ... But not using structured binding, GCC does not considered them as type depd= ent. Confirmed.=