public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/91618] [9/10/11/12 Regression] template-id required to friend a function template, even for a qualified-id Date: Thu, 07 Apr 2022 15:59:39 +0000 [thread overview] Message-ID: <bug-91618-4-Lm7UxjMieY@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-91618-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91618 Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #11 from Jason Merrill <jason at gcc dot gnu.org> --- Interesting, seems that G++ never implemented that bullet. Even though we allowed the friend declaration, it didn't match the template: template <class T> int f(T t) { return t.i; } class A { friend int ::f(A); int i; }; int main() { f(A()); // link error, trying to call non-template function } I also notice that the bullet in question is gone in the C++23 draft, replaced by new wording in [dcl.meaning.general]: (2.2.1.3) — each remaining function template is replaced with the specialization chosen by deduction from the friend declaration (13.10.3.7) or discarded if deduction fails. So, it's not clear to me that this really counts as a regression.
next prev parent reply other threads:[~2022-04-07 15:59 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-91618-4@http.gcc.gnu.org/bugzilla/> 2020-08-29 15:06 ` [Bug c++/91618] " language.lawyer at gmail dot com 2020-11-04 15:51 ` redi at gcc dot gnu.org 2020-11-04 15:51 ` redi at gcc dot gnu.org 2021-12-13 16:06 ` pinskia at gcc dot gnu.org 2021-12-13 16:07 ` pinskia at gcc dot gnu.org 2021-12-13 16:09 ` [Bug c++/91618] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org 2022-01-17 9:00 ` rguenth at gcc dot gnu.org 2022-04-07 15:59 ` jason at gcc dot gnu.org [this message] 2022-04-07 20:11 ` jason at gcc dot gnu.org 2022-04-09 1:51 ` cvs-commit at gcc dot gnu.org 2022-04-29 21:25 ` [Bug c++/91618] [9/10/11 " cvs-commit at gcc dot gnu.org 2022-05-13 15:29 ` jason at gcc dot gnu.org 2023-05-03 19:25 ` cvs-commit 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-91618-4-Lm7UxjMieY@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).