public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: giovannibajo@libero.it To: gcc-gnats@gcc.gnu.org Cc: nathan@codesourcery.com Subject: c++/10807: [DR 295] It is possible to cv-qualify references even to function types, if the CV qualifications are introduced through a typedef or a template argument Date: Thu, 15 May 2003 18:16:00 -0000 [thread overview] Message-ID: <20030515180831.27362.qmail@sources.redhat.com> (raw) >Number: 10807 >Category: c++ >Synopsis: [DR 295] It is possible to cv-qualify references even to function types, if the CV qualifications are introduced through a typedef or a template argument >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Thu May 15 18:16:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Giovanni Bajo >Release: 3.4 >Organization: >Environment: i686-pc-cygwin >Description: The following code is legal as per approval of DR 295: ------------------------------------------------- // CV qualifications through typedefs are ok (and ignored) typedef void func_type(int); typedef const volatile func_type cv_func_type; void func(int) {} cv_func_type* func_ptr = func; // CV qualifications through template arguments are ok (and ignored) template <typename T> void bar(const volatile T& p) { typedef const volatile T cvT; cvT* func = p; func(10); } int main() { bar(func); } ------------------------------------------------- dr295.cpp:3: error: `const volatile' qualifiers cannot be applied to `void ()(int)' dr295.cpp: In function `int main()': dr295.cpp:21: error: no matching function for call to `bar(void (&)(int))' Please, notice that c++/3518 is surely related to this PR. So, once this is implemented, c++/3518 should be checked again. >How-To-Repeat: Compile the above snippet >Fix: >Release-Note: >Audit-Trail: >Unformatted:
reply other threads:[~2003-05-15 18:16 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20030515180831.27362.qmail@sources.redhat.com \ --to=giovannibajo@libero.it \ --cc=gcc-gnats@gcc.gnu.org \ --cc=nathan@codesourcery.com \ /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).