From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BCF883857374; Fri, 15 Apr 2022 04:36:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BCF883857374 From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/102156] [9/10/11/12 Regression] `cannot call constructor` error during member access Date: Fri, 15 Apr 2022 04:36:08 +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: 12.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution cc bug_status 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2022 04:36:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102156 Jason Merrill changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID CC| |jason at gcc dot gnu.org Status|NEW |RESOLVED --- Comment #3 from Jason Merrill --- Why do you think that DR147 doesn't apply to this testcase? We see B::B<, = look up B in B, and DR147 says we find the constructor. The rule mentioned in PR11764, that lookup in a nested-name-specifier only considers types and namespaces, doesn't apply here because the name B isn't followed directly by ::. The current draft even has an example to illustra= te this: template struct B : A {}; namespace N { template void B(); int f() { return B<0>::n; // error: N=E2=80=8B::=E2=80=8BB<0> is not a type } } EDG also rejects this testcase.=