public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "waffl3x at protonmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113191] [11/12/13/14 Regression] Incorrect overload resolution when base class function introduced with a using declaration is more constrained than a function declared in the derived class Date: Tue, 02 Jan 2024 18:24:52 +0000 [thread overview] Message-ID: <bug-113191-4-oYzBg87eBE@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113191-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113191 --- Comment #2 from waffl3x <waffl3x at protonmail dot com> --- > Looking at the above commit, joust already takes care to check > more_constrained for non-template functions, and only if their function > parameters match according to cand_parms_match. But here cand_parms_match > returns false due to different implicit object parameters: Okay yeah I definitely misunderstood something in more_specialized_fn, what it does works but is arguably not the right thing. > (gdb) frame > #0 cand_parms_match (c2=0x3402cc0, c1=0x3402d70) at gcc/cp/call.cc:12699 > 12699 if (DECL_FUNCTION_MEMBER_P (fn1) > (gdb) pct parms1 > > struct B *, void > > (gdb) pct parms2 > > struct S *, void > > In contrast more_specialized_fn skips over the implicit object parameter > when comparing two non-static memfns. Maybe cand_parms_match should follow > suit? We COULD do that, but it won't solve the problems with implementing the xobj/iobj cases. With that said it probably does make more sense to skip the object parameter when comparing two iobj member functions. Are there ever any situations where both candidates are viable, but have different object parameters? I'm pretty sure that will never be the case, right? I guess I'll have to open another PR for the xobj/iobj cases because I think I agree with your evaluation of this.
next prev parent reply other threads:[~2024-01-02 18:24 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-01 17:00 [Bug c++/113191] New: [10.1/11/12/13/14 " waffl3x at protonmail dot com 2024-01-02 15:49 ` [Bug c++/113191] [11/12/13/14 " ppalka at gcc dot gnu.org 2024-01-02 18:24 ` waffl3x at protonmail dot com [this message] 2024-01-11 22:02 ` cvs-commit at gcc dot gnu.org 2024-01-12 15:14 ` jason 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-113191-4-oYzBg87eBE@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).