public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ich.freak at gmx dot net" <gcc-bugzilla@gcc.gnu.org> 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 [thread overview] Message-ID: <bug-103540-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103540 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 fully 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<T>, then gcc refuses to compile the code saying something like "satisfaction of atomic constraint X<T> depends on itself". If T is large, however, it may be very difficult to determine where exactly T depends on X<T> 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<T> depends on itself because the type T::something declared in line Z depends on X<T>" I prepared a small example here <https://godbolt.org/z/q9KczYb16>. Note that diagnostics end with <source>: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?"
next reply other threads:[~2021-12-03 14:05 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-03 14:05 ich.freak at gmx dot net [this message] 2021-12-03 22:10 ` [Bug c++/103540] " redi at gcc dot gnu.org 2021-12-05 16:04 ` ich.freak at gmx dot net
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-103540-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).