From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B0CC53858411; Fri, 3 Dec 2021 14:05:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B0CC53858411 From: "ich.freak at gmx dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103540] New: diagnosting concept depends on itself Date: Fri, 03 Dec 2021 14:05:27 +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: 11.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ich.freak at gmx dot net 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_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: Fri, 03 Dec 2021 14:05:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103540 Bug ID: 103540 Summary: diagnosting concept depends on itself Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ich.freak at gmx dot net Target Milestone: --- When a concept X is checked for a template parameter T, this parameter is f= ully instanciated. (while this may not be necessary to check the concept, this seems to be dictated by the standard if I understood correctly) If the instanciation of T depends on the concept X, then gcc refuses to compile the code saying something like "satisfaction of atomic constraint X depends on itself". If T is large, however, it may be very difficult to determine where exactly= T depends on X and gcc currently does not help at all to find the problem. It would be nice if gcc could tell the reader something like "X depends = on itself because the type T::something declared in line Z depends on X" I prepared a small example here . Note that diagnostics end with :5:14: note: the required type 'typename N::something' is invalid, because 5 | typename N::something; | ~~~~~~~~~^~~~~~~~~~~~~ Compiler returned: 1 leaving the reader to wonder "because of what?"=