public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "Rainer dot Bensch at rsd dot rohde-schwarz dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/13452] No error on invalid (I think) C++ code Date: Mon, 12 Jan 2004 16:11:00 -0000 [thread overview] Message-ID: <20040112161058.17781.qmail@sources.redhat.com> (raw) In-Reply-To: <20031219185750.13452.ian@airs.com> ------- Additional Comments From Rainer dot Bensch at rsd dot rohde-schwarz dot com 2004-01-12 16:10 ------- (In reply to comment #0) > However, it now seems to me that there should be an error on the trailing const. No. > Otherwise, I have no idea what the trailing const means. It appears that > generating a const method (i.e., a method for which `this' is a pointer to > const) requires > class C { public: template<typename i> int (*f() const)(); }; > This may be a misunderstanding on my part, but at least some people share my > misunderstanding; see PR c++/13447. You declared a non const member function f() which returns a pointer to a const member function. If the const is inside the parenteses, you declare a const member function f() which returns a pointer to a non const member function. Now, consider to place const at both... Cheers, Rainer -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13452
next prev parent reply other threads:[~2004-01-12 16:11 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-12-19 19:28 [Bug c++/13452] New: " ian at airs dot com 2003-12-23 18:33 ` [Bug c++/13452] " pinskia at gcc dot gnu dot org 2004-01-12 16:11 ` Rainer dot Bensch at rsd dot rohde-schwarz dot com [this message] 2004-01-12 16:27 ` ian at airs dot com 2005-05-25 1:11 ` ian at airs dot com [not found] <bug-13452-4@http.gcc.gnu.org/bugzilla/> 2013-04-09 17:16 ` paolo.carlini at oracle dot com 2013-06-16 16:14 ` paolo.carlini at oracle 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=20040112161058.17781.qmail@sources.redhat.com \ --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).