From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BDE39385800A; Tue, 2 Feb 2021 19:40:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BDE39385800A From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98939] New: [C++23] Implement P1787R6 "Declarations and where to find them" Date: Tue, 02 Feb 2021 19:40:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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_id short_desc product version bug_file_loc bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Tue, 02 Feb 2021 19:40:25 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98939 Bug ID: 98939 Summary: [C++23] Implement P1787R6 "Declarations and where to find them" Product: gcc Version: 10.0 URL: http://wg21.link/p1787r6 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jason at gcc dot gnu.org Target Milestone: --- The changes from this paper should not affect a significant amount of code; many are clarifications that bring the wording in line with existing practi= ce, some are clarifications of corner cases that most code doesn't depend on, l= ike ambiguous lookup within a conversion-type-id. A few changes that allow code that has been ill-formed: conversion-type-id is added to the list of type-only contexts from P0634: template struct A { operator T::type(); }; // OK ::template is also not required in type-only contexts: template auto f(T t) { return static_cast>(t); } // OK Default template arguments are now complete-class contexts, like default function arguments: template struct A { template void g() { } // OK T t; }; One change that might break a small amount of existing code: Since lookup for a name after . or -> now happens first in the scope of the object, .template is required in dependent.template X<...> even if a defini= tion of X would be found by unqualified lookup. template struct X { void f(); }; template void g(T t) { t.X<2>::f(); } // error, needs .template=