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++/102609] [C++23] P0847R7 - Deducing this Date: Sat, 19 Aug 2023 08:44:39 +0000 [thread overview] Message-ID: <bug-102609-4-QtrVwMBgtP@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-102609-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609 --- Comment #7 from waffl3x <waffl3x at protonmail dot com> --- struct S { int f(this S*) { return 5; } }; int main() { S s{}; return s.f(); } Here is my current progress, this code works. I have a good feeling that the rest is going to be easy. Except for deduction maybe, but I have a minor hunch that it might -just work- without any extra tinkering after everything else has been implemented. Also yes, I know that `int f(this S*)` is not a valid declaration, I just didn't have to change any member function call code for it to work this way so I made it my first goal to implement it this way. Actually, I guess it's not explicitly invalid is it? I don't recall seeing it in the pathological cases section of the paper, indeed, I just checked and there doesn't seem to be mention of it. I believe it should probably be valid though, not useful if you ask me. Even less so than the other pathological cases (which I think might actually prove to be useful in some cases.) However, regardless of my opinion, following the same direction as the original paper, I imagine it should be allowed. The class would just need an implicit conversion to pointer, maybe a warning would be in order though?
next prev parent reply other threads:[~2023-08-19 8:44 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-05 15:56 [Bug c++/102609] New: " mpolacek at gcc dot gnu.org 2021-11-28 11:33 ` [Bug c++/102609] " pinskia at gcc dot gnu.org 2023-06-12 23:37 ` mpolacek at gcc dot gnu.org 2023-08-16 18:29 ` waffl3x at protonmail dot com 2023-08-16 18:48 ` gasper.azman at gmail dot com 2023-08-16 18:50 ` gasper.azman at gmail dot com 2023-08-16 21:58 ` waffl3x at protonmail dot com 2023-08-19 8:44 ` waffl3x at protonmail dot com [this message] 2023-08-19 9:38 ` redi at gcc dot gnu.org 2023-08-19 9:43 ` redi at gcc dot gnu.org 2023-08-19 16:10 ` gasper.azman at gmail dot com 2023-08-19 21:24 ` waffl3x at protonmail dot com 2023-08-20 14:21 ` gasper.azman at gmail dot com 2023-08-21 1:24 ` waffl3x at protonmail dot com 2023-08-21 15:17 ` barry.revzin at gmail dot com 2023-08-25 11:28 ` waffl3x at protonmail dot com 2023-08-31 6:50 ` waffl3x at protonmail dot com 2023-08-31 9:28 ` gasper.azman at gmail dot com 2023-09-02 8:54 ` waffl3x at protonmail dot com 2023-09-02 22:30 ` gasper.azman at gmail dot com 2024-01-09 21:56 ` cvs-commit at gcc dot gnu.org 2024-01-09 21:56 ` cvs-commit at gcc dot gnu.org 2024-01-09 21:56 ` cvs-commit at gcc dot gnu.org 2024-01-09 21:56 ` cvs-commit at gcc dot gnu.org 2024-01-09 21:57 ` cvs-commit at gcc dot gnu.org 2024-01-11 20:47 ` corentinjabot at gmail dot com 2024-01-11 21:08 ` waffl3x at protonmail dot com 2024-01-11 22:00 ` gasper.azman at gmail dot com 2024-01-11 22:01 ` jakub at gcc dot gnu.org 2024-01-12 0:26 ` waffl3x at protonmail dot com
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-102609-4-QtrVwMBgtP@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).