public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "barry.revzin at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/79070] Unhelpful error message for ambiguous type in template parameter Date: Mon, 29 Mar 2021 22:44:56 +0000 [thread overview] Message-ID: <bug-79070-4-tnxP0LkHSq@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-79070-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79070 Barry Revzin <barry.revzin at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barry.revzin at gmail dot com --- Comment #3 from Barry Revzin <barry.revzin at gmail dot com> --- Here are a few more cases, reduced from a larger example that took me a very long time to understand. I'm adding as comments the compile error emitted for each invalid use: namespace N { template <typename T, typename U, typename V> struct Something { }; template <typename> concept C = true; template <typename> struct X { }; } using namespace N; template <typename T> struct Something { }; // parse error in template argument list static_assert(C<Something<int>>); // template argument 1 is invalid X<Something<int>> x; // reference to Something is ambiguous using T = Something<int>; In the last case, the compiler error is super clear and it is obvious what the error is. In the other two, not so much.
next parent reply other threads:[~2021-03-29 22:44 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-79070-4@http.gcc.gnu.org/bugzilla/> 2021-03-29 22:44 ` barry.revzin at gmail dot com [this message] 2021-03-30 10:41 ` redi at gcc dot gnu.org 2021-12-14 5:47 ` pinskia at gcc dot gnu.org
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-79070-4-tnxP0LkHSq@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).